- Smoljames Newsletter
- Posts
- What is DOM Manipulation and how does it work?
What is DOM Manipulation and how does it work?
Hey Friends :)
Hope you’ve all had a cash money start to the week 🔥
Here’s what’s up for the week of Saturday 14th October, 2023.
New Youtube Video - What is DOM Manipulation and how does it work?
To understand what DOM Manipulation is, we must first go back to the beginning, and take a look static websites (static websites represent a majority of the 1.13 Billion on the internet). They all typically boil down to nothing more than good old HTML & CSS; we can think of these websites as responsive PDF’s, as the content is generally unchanging, like a PDF, yet the page looks good on all device sizes.
The compliment to a static website is, you guessed it, a dynamic website. Dynamic websites are just static websites that cater for user interactivity, i.e. they can change/update/vary on a user-to-user basis, depending on how the user chooses to interact with them. We enable this user interactivity by adding JavaScript to our HTML & CSS mix.
Finally, the way that JavaScript creates this website interactivity is via DOM Manipulation, or manipulation of the Document Object Model (DOM). Document refers to the HTML Document (like we have Word Documents, we also have HTML Documents), and Model essentially refers to the way that we model the document as a JavaScript Object. This means that in JavaScript we can interact with our HTML Document as if it were an object via the document class, utilizing all it’s pre-existing methods and accessing / manipulating it’s values.
To learn even more about DOM Manipulation and how it works, you can watch the video here (this video is 3rd in the CODE//54 challenge!) →
Project Streams
Just a PSA that I’m looking into doing a weekly (weekend) stream on YouTube where we basically build coding projects together. This will cover stuff like how to validate your ideas, how to plan your projects, how to design system architecture and choose your infrastructure, and much much more.
If that sounds like your cup of tea, let me know! Equally if you have other ideas for things you’d like to see in a stream, I would love to hear.
Thanks for reading and hope you all have a great weekend ahead 🔥
Cheers,
Smoljames