Html document stream and Document Object Model DOM comprehension-xia Yi

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.