The Document Object Model (DOM) represents an HTML or XML document as a tree of objects. JavaScript can access and modify those objects to change what the browser displays. section 1.2 section 3.1
The DOM tree contains different kinds of nodes, including:
- HTML elements section 3.1
- Element attributes section 3.1
- Text and comments section 3.1
Custom elements are not self-closing
Built-in elements such as <img> may be written without an explicit closing tag. A custom element such as <hello-world name="Mark"></hello-world> requires both an opening and closing tag, even when it has no content. section 3.1
Web components use DOM concepts to define reusable elements. Their structure, styles, and behavior can also be encapsulated in a shadow DOM, reducing unintended interaction with the rest of the page. section 1.2











