DOM Mastery: JavaScript Control & Manipulation

🚀 Day 42 of My JavaScript Journey — Exploring the DOM (Document Object Model) Today was all about diving deeper into the DOM (Document Object Model) and understanding how JavaScript can control and manipulate web pages in real time. Instead of just writing static HTML and CSS, I learned how to make websites dynamic, interactive, and responsive to user actions. 📌 What I learned today: 🔹 DOM Basics I understood how the DOM represents an HTML document as a structured tree of elements, which JavaScript can access and modify. 🔹 Selecting Elements in the DOM I practiced multiple ways to select elements: getElementById() getElementsByClassName() getElementsByTagName() querySelector() querySelectorAll() This helped me understand when and why to use each method. 🔹 Manipulating Content I learned how to change content dynamically using: innerText innerHTML textContent 🔹 Styling with JavaScript I explored how to change CSS styles directly using JavaScript and understood why using classes is often better for larger styling changes. 🔹 Event Listeners & Interactivity I learned how to make web pages interactive using events like: click mouseover keydown submit This made it clear how user actions connect with JavaScript logic. 🔹 Randomness + DOM Logic One of the most interesting parts was learning how to use Math.random() with DOM manipulation to create unpredictable and dynamic behavior on a webpage — like random colors, positions, and elements. 🛠️ Task Practice: Counter Project To strengthen my understanding, I built a simple counter using: Increase button Decrease button Reset button This task helped me connect theory with practical implementation and improved my DOM fundamentals. 💭 What I realized: Learning the DOM is not just about syntax — it’s about understanding how websites actually work behind the scenes. The more I practice manipulating elements and handling events, the more confident I feel about building real-world interactive UI. 🙏 Thanks to Sheryians Coding School for providing structured guidance and hands-on challenges that push me to grow every day. 📈 Step by step, I’m moving closer to becoming a better frontend developer. #JavaScript #DOM #WebDevelopment #FrontendDevelopment #LearningJourney #Coding #SheryiansCodingSchool #100DaysOfCode

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories