Doctype_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:47:57
Original
1154 people have browsed it

Doctype in HTML has two main purposes.

1. Verify the validity of the document

It tells the user agent and validator what DTD this document is written according to. This action is passive. Every time the page is loaded, the browser does not download the DTD and check the validity. It is only enabled when the page is manually verified.

2. Determine the browser's rendering mode

For actual operations, inform the browser which parsing algorithm to use when reading the document. If it is not written, the browser will parse the code according to its own rules, which may seriously affect the html layout. Browsers have three ways to parse HTML documents.

  • Standard Mode
  • Weird Mode
  • Almost Standard Mode
  • Related Links:

    Mode? Standard!

    Enable browser mode through Doctype

    CS002: DOCTYPE and browser mode analysis

    KB001: Compatibility issues and browser kernel and rendering mode

    In-depth understanding of browser compatibility mode

    Related labels:
    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template