Multiple choice

Which of the following methods in DOM allows you to create a new element node and takes a single argument which is the tag name of the element that you want to create?

  1. createTextNode

  2. createElement

  3. setAttribute

  4. appendChild

  5. removeChild

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This method in DOM allows you to create a new element node and takes a single argument which is the tag name of the element that you want to create.