javascript-dom-creation-1 Flashcards
1
Q
What are two ways to target elements on the DOM?
A
QuerySelector
GetElementByID
2
Q
What is another way to add a text node to an element other than using textContent.
A
innertext (avoids whitespace)
3
Q
How do you create a HTML element using vanilla Javascript?
A
createElement method of document object.
document.createElement()