Dom Traversal Flashcards

1
Q

What is the difference between the parentNode and parentElement properties?

A

not all nodes are elements. node is a node with children, element holding content

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

Why is it important to be able to traverse the DOM?

A

You can traverse to children and parents and find your elements indirectly

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

What kind of information is useful to store in custom attributes?

A

Its relation to other elements and also in relation to javascript

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