Html document stream and Document Object Model DOM understanding-xia Yi Preface
When understanding float and positioning, you can touch the document flow concept. To better understand floating and positioning, we learned the Document Stream and DOM (Document Object Model ).
Body
DOM (Document Object Model) is a tree structure composed of all the content on the html page. For example:
According to W3C html dom standards, all content in HTML documents is node:
- The entire document is a document node.
- Each HTML element is an element node.
- The text in the HTML element is a text node.
- Each HTML attribute is an attribute node.
- A comment is a comment node.
Document Stream is another concept. stream is actually the method used by the browser to place Html elements on the page. Most elements are in the Document Stream by default. The browser starts from the top of the Html file and displays each element from top to bottom along the element Stream one by one. That is, elements are arranged on top, bottom, and left stacked in the order written in HTML. The block-level elements have a line feed, while the inline elements do not have a line feed.
This article will be updated continuously and I will have a new understanding of the document stream and DOM.