06: The DOM

The Document Object Model (DOM) is how JavaScript sees and manipulates HTML. It could also be the way the browser stores it internally, but you can't be sure the code is truly written that way. For your purposes it's important to know that HTML is "stored" as a data structure that JavaScript can manipulate. This data structure gets very complex, but I'll cover the most basic important part of it now.

First, A Tree

<p>
    Hello I am <b>Zed</b>.
</p>

This example is designed to demonstrate the concept of a "tree" for storing a document. In the very first lesson I covered some of this, but now I'll get a little more official and explain how this is sort of stored. The reason I can't exactly explain how it's stored is you need to know JavaScript first. For now you'll learn this simplified "lie".

Learn JavaScript Today

Register today for the Beginner Basics course and get the new releases by just paying the difference. There's also special discounts for existing customers when new courses are released.


Still Not Sure? Check out more curriculum!