javascript-dom-creation-1 Flashcards

1
Q

What are two ways to target elements on the DOM?

A

QuerySelector

GetElementByID

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

What is another way to add a text node to an element other than using textContent.

A

innertext (avoids whitespace)

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

How do you create a HTML element using vanilla Javascript?

A

createElement method of document object.

document.createElement()

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