HTML5 Basic Chapter 1

Source: Internet
Author: User
Tags deprecated

①<! doctype> (declaring document type):

<! Doctype> must be declared on the first line of the document, and before the HTML tag.

<! Doctype> is a rule page that uses that HTML version of an instruction, not a label, in HTML4.0.1, <! Doctype> declares that reference dtd,html4.0.1 is based on SGML (standard Universal Markup Language), that the DTD prescribes the rules for markup language, and that there is no rush to SGML in HTML5, so there is no reference to the DTD.

Attention

<! Doctype> no end tag, <! Doctype> not sensitive to case

Three kinds of <! are stipulated in the HTML4.0.1 The doctype> tag declaration, as shown in the following:

HTML 4.01 Strict

The DTD contains all the HTML elements and attributes, but does not include the display and deprecated elements (such as font). Frameset (framesets) is not allowed.

<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01//en" "HTTP://WWW.W3.ORG/TR/HTML4/STRICT.DTD" >
HTML 4.01 Transitional

The DTD contains all the HTML elements and attributes, including both display and deprecated elements (such as font). Frameset (framesets) is not allowed.

<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "HTTP://WWW.W3.ORG/TR/HTML4/LOOSE.DTD" >
HTML 4.01 Frameset

The DTD is equivalent to the HTML 4.01 transitional, but allows the frameset content.

<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 frameset//en" "HTTP://WWW.W3.ORG/TR/HTML4/FRAMESET.DTD" >

And there's only one <! in HTML5. Doctype> statement:
<! DOCTYPE html>


Used to describe document types
③<body> Label
Document body, both the visual part of the Web page

Hyper Text Markup Language both HTML (Hypertext Markup Language),


Chinese code:
In the HTML page of the head declaration character is UTF-8 can solve the phenomenon of Chinese garbled in the browser.
<meta charset= "Utf-8" >


HTML5 Basic Chapter 1

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.