- Document Object Model
- tree
- element node
-
What is the DOM and why must we learn to manipulate it?
- HTML page as an object
- to make our websites dynamic
-
Why is it important that we build dynamic webpages?
- So that we can have the BEST user experience (easy to digest, attract for people!)
-
Which sort of engineers would work with the DOM most often?
- frontend engineers
- full-stack engineers
-
What tools can we use to visualize the DOM?
- Developer Tools
- Inspect
- Elements
- Console
- Developer Tools
-
What is the
document
object?- The DOM and HTML are two similar, but they are DIFFERENT
- The DOM is alive, changes, can grow, can be dynamic
- Access properties like any object
- data properties as well as methods
- Update/assignmetn property values like any other object
-
How does the tree data structure allow us to visualize relationships between elements in the DOM?
- Helps us see parent-child relationships
- HTML file can be thought of as a tree!
- We will be developing in VSCode and our local (Ubuntu) terminal.
- We will be using
Inspect
to view theElements
tab and theConsole
. debugger
is your new best friend.
- Same set up as in previous units!
index.html
links to anystyles.css
with a script tag toindex.js
- Open up your
index.html
in the browser - Or use the Live Server VSCode Extention
- So we can access its children and traverse it like a tree!
- So we can access and edit its properties like a regular object!