DOM Flashcards

1
Q

What is a DOM tree?

A

A representation of HTML as a tree structure of tags

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What console method allows you to inspect the properties of a DOM element object?

A

console.dir()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly