DOM understanding of Html document stream and Document Object Model,
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. It refers to a rule for HTML elements to be arranged and displayed on webpages. Most elements are in Document Stream by default. These rules include: elements are arranged in the order written in HTML, and stacked from top to bottom. 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.