DOM Manipulation Mindmap

Khadija Batool Gardezi
2 min readMar 22, 2023

--

Empowering developers one line of code at a time — Helping my fellow devs reach new heights!

As a developer, understanding how to manipulate the Document Object Model (DOM) is crucial to building dynamic and interactive web applications. However, many developers often find this task daunting and complicated, especially when trying to achieve it using only vanilla JavaScript.

In this blog post, we’ll be discussing a carefully curated DOM manipulation Mindmap designed to help developers who think it’s too hard to get the job done by Vanilla Js.

DOM manipulation is essential to building modern web applications because it enables developers to create interactive and responsive user interfaces. By manipulating the DOM, developers can create dynamic content that responds to user input, change styles and layout of the page on the fly, and create animations and transitions that make the user experience more engaging.

├── Selecting Elements
│ ├── `getElementById()`
│ ├── `getElementsByClassName()`
│ ├── `getElementsByTagName()`
│ ├── `querySelector()`
│ └── `querySelectorAll()`
|
├── Modifying Elements
│ ├── `innerHTML`
│ ├── `textContent`
│ ├── `setAttribute()`
│ ├── `getAttribute()`
│ ├── `removeAttribute()`
│ ├── `classList`
│ ├── `style`
│ └── `appendChild()`
|
├── Creating and Deleting Elements
│ ├── `createElement()`
│ ├── `createTextNode()`
│ ├── `cloneNode()`
│ ├── `insertBefore()`
│ ├── `removeChild()`
│ └── `replaceChild()`
|
├── Traversing the DOM
│ ├── `parentNode`
│ ├── `childNodes`
│ ├── `firstChild`
│ ├── `lastChild`
│ ├── `nextSibling`
│ └── `previousSibling`
|
├── Events
│ ├── `addEventListener()`
│ ├── `removeEventListener()`
│ ├── `event.target`
│ ├── `event.preventDefault()`
│ ├── `event.stopPropagation()`
│ └── Event types
|
├── Styling Elements
│ ├── `className`
│ ├── `classList`
│ ├── `style`
│ ├── `getComputedStyle()`
│ └── CSS properties
|
├── Layout
│ ├── `offsetWidth`
│ ├── `offsetHeight`
│ ├── `clientWidth`
│ ├── `clientHeight`
│ ├── `scrollWidth`
│ └── `scrollHeight`
|
└── Animations
├── CSS Animations
├── `requestAnimationFrame()`
├── `setInterval()`
├── `setTimeout()`
├── `cancelAnimationFrame()`
├── `clearInterval()`
└── `clearTimeout()`

Hope this blog post has been informative and helpful to you. Remember, mastering DOM manipulation takes time and practice, but with the right resources, you can achieve your goals.

Thank you for reading, and happy coding y’all!

--

--

Khadija Batool Gardezi

Dev — SignalWire |GitHub Campus Expert // Google DSC // MLSA |