Explain The Document Object Model Essay
The Document Object Model is basically a mapping layout model for the HTML. To put it more simply it takes the HTML and treats it kind of like a tree structure. The overall part is the document and within the document is the HTML, and within that is the head and body tags and so on. This shows the layout of the model to look tree-like. These sections can be described in parent, child, and siblings and are known as nodes. The parent nodes would be the HTML tags and the children of that could be the head and body tags. The head and body tags then would be called sibling nodes. These nodes also have various types. There is the element node, text node, attribute node and document node. The document node is the first node encompassing all the rest.
Element nodes are the one that will make up most of your document. These are the tags you use for structure around any information you have. The body, html, paragraph, and even the heading nodes make up these element nodes. You might think that the heading and paragraph tags would be text nodes, but that is not the case.