Report Bug
Qus : How do you add a new HTML element to the DOM in JavaScript?
Qusआप जावास्क्रिप्ट में DOM में एक नया HTML तत्व कैसे जोड़ते हैं?

A. document.createElement()
B. document.appendElement()
C. document.insertElement()
D. document.newElement()


Solution
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()



Report Bug