2016-9-8 about <! DOCTYPE html>

Source: Internet
Author: User

<! DOCTYPE html>

function :

Declare the type of document resolution (DOCUMENT.COMPATMODE) to avoid the bizarre behavior of the browser.

Avoid page-style bugs in different browsers, browser-compatible issues.

Two ways to page rendering (Document.compatmode):

Quirks mode (BACKCOMPAT): The browser uses its own quirks mode to render the page (default)

Standard mode (CSS1COMPAT): Browsers use the Web mode to render pages

If we don't <! DOCTYPE html> to make a statement, the page defaults to the weird mode (BACKCOMPAT). This will show different browser pages.

We declare the <! DOCTYPE html>, the page will render the page in a Web-based mode, avoiding different styles of bugs in different browsers.

How to use:

Case insensitive

1. Add <! to the first line of the HTML page DOCTYPE html>

2.JSP page, add the next line of <% @page%>

2016-9-8 about <! DOCTYPE html>

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.