Manipulating Documents using the DOM
Overview
The Document Object Model or DOM represents the logical tree structure of a document. The DOM allows us to connect to the document through programming languages, including JavaScript.
"The DOM represents a document with a logical tree. Each branch of the tree ends in a node,
and each node contains objects. DOM methods allow programmatic access to the tree. With them,
you can
change the document's structure, style, or content. Nodes can also have event handlers
attached to
them. Once an event is triggered, the event handlers get executed." - MDN Web Docs
Prepare
- Read: 📃 DOM (Document Object Model) - javascript.info
- Read: 📃 DOM tree - javascript.info
- Read: 📃 Manipulating Documents - MDN web docs
Check Your Understanding
- Complete the DOM Basics activity in your cse121b local repository space in a
location that makes sense to you, e.g., such as a
week02
sub-folder. - Upload your work to your GitHub Pages enabled cse121b repository.