Adding/Removing Elements

Learn how to create and remove elements from the DOM using JavaScript.

document.createElement(element)

You can create a new element using document.createElement(), with the argument element, which is the element name.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy