DOM Flashcards
1
Q
What is a DOM tree?
A
A representation of HTML as a tree structure of tags
2
Q
Why is it good practice to assign the return value of a DOM query to a variable?
A
DOM querying takes an eternity, so search once and store it so that it is reusable and accessable
3
Q
What console method allows you to inspect the properties of a DOM element object?
A
console.dir()
4
Q
Why would a
tag need to be placed at the bottom of the HTML content?
A
The browser needs to run the HTML document first to create the DOM
5
Q
A