February 2018
Intermediate to advanced
298 pages
8h 22m
English
The HTML DOM is a tree version of how the document looks. Here is a very simple example of an HTML document:
<!doctype HTML><html> <head> <title>Cool Stuff!</title> </head> <body> <p>Awesome!</p> </body></html>
Here's how its tree version will look:

The previous diagram is just a rough representation of the DOM tree. HTML tags consist of head and body; furthermore, the <body> tag consists of a <p> tag, whereas the <head> tag consists of the <title> tag. Simple!
JavaScript has access to the DOM directly, and can modify the connections between these nodes, add nodes, remove nodes, change contents, attach event listeners, and so ...
Read now
Unlock full access