What allows a scripting language to manipulate elements on a web page?
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
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.
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.
MDN Web Docs - DOM
W3Schools - JavaScript HTML DOM
Currently there are no comments in this discussion, be the first to comment!