What is HTML DOM?

Asked 19-Jul-2021
Viewed 270 times

1 Answer


1

The Document Object Model is a standard of the W3C (World Wide Web). It defines the standard for accessing a document. In other words, the Document Object Model provides a platform for programs and scripts to dynamically access and update the structure, style, and content of a document. The Document Object Model is a W3C (World Wide Web) standard. It defines the standard for accessing a document. In other words, the DocumentObject model provides a platform for programs and scripts to dynamically access and update the structure, style, and content of a document.

feature of javaScript

  1. Javascript can access and change all the tags of the webpage.
  2. Javascript can access and change all the attributes of the webpage.
  3. Javascript can remove old html elements such as Tags, Attributes from the webpage.
  4. New tags and attributes can be added to the webpage by Javascript.
  5. Javascript can change all the CSS styles of the webpage.
  6. New events can be created by Javascript.
 NOTE: 
Document means Webpage.
Object means different elements like tags, attributes etc.
Model means texture or structure.

Example

<!DOCTYPE HTML>
<html>
<head>
  <title>About elk</title>
</head>
<body>
  The truth about elk.
</body>
</html>

  DOM represents HTML as a tree structure of tags   

What is HTML DOM?