MCQ Answer

How do you add a new HTML element to the DOM in JavaScript?

How do you add a new HTML element to the DOM in JavaScript?

आप जावास्क्रिप्ट में DOM में एक नया HTML तत्व कैसे जोड़ते हैं?
Topic : JS DOM Manipulation

A. document.createElement()

B. document.appendElement()

C. document.insertElement()

D. document.newElement()




Correct Answer is :

A. document.createElement()



Explanation
The createElement() method is used to create a new element node. You can then append it to the DOM using methods like appendChild() or insertBefore()
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad