The Document Object Model (DOM) is an API for HTML and XML documents that defines the logical structure of documents and the way a document is accessed and manipulated.
DOM Explanation:
The DOM represents the page so that programs can change the document structure, style, and content.
It provides a way for scripts to update the content, structure, and style of a document while it is being viewed.
Explanation:
Option A: CSS is incorrect because it is used for styling web pages.
Option B: XML is incorrect because it is a markup language, not an API for manipulating web page elements.
Option C: HTML is incorrect because it is the markup language used to create web pages, not an API for manipulation.
Option D: DOM is correct because it allows a scripting language to manipulate elements on a web page.
References:
MDN Web Docs - DOM
W3Schools - JavaScript HTML DOM
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit