Lancecourse
Courses
How-tos
Blog
Sign In
Sign Up
free
Francais
JavaScript DOM Manipulation
Test your knowledge on JavaScript DOM manipulation concepts.
Question 1
What does DOM stand for in web development?
Document Object Model
Data Object Model
Document Object Management
Dynamic Object Model
Question 2
Which method is used to create a new HTML element in JavaScript?
document.createElement()
document.newElement()
createElement()
newElement.create()
Question 3
Which of the following is used to select elements by their ID in JavaScript?
document.getElementById()
document.getElementsByClassName()
document.querySelector()
document.querySelectorAll()
Question 4
What is the correct method to remove an element from the DOM?
removeChild()
deleteElement()
remove()
destroy()
Question 5
Which property is used to change the CSS style of an element in JavaScript?
style
cssText
className
attributes
Question 6
What method is used to attach an event handler to an element?
addEventListener()
attachEvent()
setEvent()
eventBind()
Question 7
Which method would you use to get the text content of an element?
textContent
innerHTML
getText()
value
Question 8
How do you add a class to an element in JavaScript?
classList.add()
addClass()
setAttribute()
appendClass()
Question 9
Which method can be used to find elements by their class name?
document.getElementsByClassName()
document.querySelector()
document.getElementById()
document.select()
Question 10
What does the `createElement` method return?
A new HTML element
An HTML element ID
A string
An error
Answer all the questions then submit.
Submit Answers