Write a program that shows the use of DOM?

Write a program that shows the use of DOM?



- The root node is always written in HTML code <html> and the document nodes also mentioned in this node.

- <html> consists of mostly two child nodes in the form of <head> and <body> and in <head> there is a sub-node that is present <title>.

- <body> tag contains the node of the other tags that are used for visual representation of the content and it always stored in the text nodes.

- The program that is used to represent the structure of the DOM:

<html>
<head>
<title>DOM Tutorial</title>
</head>
<body>
<h1>DOM Lesson one</h1>
<p>Hello world! </p>
</body>
</html>
Post your comment