HTML <html> tag
Examples
Simple HTML5 document:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> Document Title </ title>
</ Head>
<Body>
Content of the document ......
</ Body>
</ Html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> Document Title </ title>
</ Head>
<Body>
Content of the document ......
</ Body>
</ Html>
try it"
Browser Support
All major browsers support the <html> tag.
Tag definitions and instructions
<Html> tag tells the browser that this is an HTML document.
<Html> tag is an HTML document outermost element.
<html> tag all other HTML elements (except <! DOCTYPE> tag) containers.
Differences between HTML 4.01 and HTML5
HTML5, add a new property: manifest.
Differences between HTML and XHTML
xmlns attribute is required in XHTML but not in HTML.
However, even if the XHTML document <html> not use the xmlns attribute, HTML validator on the W3C is not being given. This is because "xmlns = http: //www.w3.org/1999/xhtml" is a fixed value, even if you do not include it, the value will be added to the <html> tag.
Attributes
New: HTML5 new property.
属性 | 值 | 描述 |
---|---|---|
manifest New | URL | 定义一个 URL,在这个 URL 上描述了文档的缓存信息。 |
xmlns | http://www.w3.org/1999/xhtml | HTML 不支持。只有 XHTML 支持。 规定 XML 的 namespace 属性(如果您需要您的内容符合 XHTML,则使用这个属性。)。 |
Global Properties
<html> tag supports HTML global properties .