From the course: Web Components and Modularization: Practical Approaches

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

A DOM tree with branches and leaves

A DOM tree with branches and leaves

From the course: Web Components and Modularization: Practical Approaches

Start my 1-month free trial

A DOM tree with branches and leaves

- [Instructor] Whether you use components or not, the end result of your work, what is parsed and displayed by the browser, will always be standard HTML in the form of a DOM tree. That even applies to web components, since they are part of web standards. This fact, anchors are processed to the DOM tree and its structure as we move forward. Once you've drawn out a component visually like the book carousel here, you can draw out a corresponding DOM tree to figure out what you want that component to look like in code by the time it reaches the browser. This step allows us to codify the box drawings and start thinking about the component as a small program that generates HTML for us. Looking at our book carousel component, we can create a rough draft of a DOM tree that uses the essential components to see how they structure together. Seeing the DOM tree for the component laid out like this, we can apply the mental model of a…

Contents