HTML标签
<!-->
<!DOCTYPE>
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<article>
<aside>
<audio>
<b>
<base>
<basefont>
<bdi>
<bdo>
<big>
<blockquote>
<body>
<br>
<button>
<canvas>
<caption>
<center>
<cite>
<code>
<col>
<colgroup>
<command>
<datalist>
<dd>
<del>
<details>
<dfn>
<dialog>
<dir>
<div>
<dl>
<dt>
<em>
<embed>
<fieldset>
<figcaption>
<figure>
<font>
<footer>
<form>
<frame>
<frameset>
<head>
<header>
<hgroup>
<h1> - <h6>
<hr>
<i>
<iframe>
<img>
<input>
<ins>
<kbd>
<keygen>
<label>
<legend>
<li>
<link>
<map>
<mark>
<menu>
<meta>
<meter>
<nav>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<pre>
<html>
<progress>
<q>
<rp>
<rt>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strike>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<textarea>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<track>
<tt>
<u>
<ul>
<var>
<video>
<wbr>
<html>
HTML<html> 标签
实例
简单的 HTML5 文档:
<!DOCTYPE HTML>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
浏览器支持
所有主流浏览器都支持 <html> 标签。
标签定义及使用说明
<html> 标签告知浏览器这是一个 HTML 文档。
<html> 标签是 HTML 文档中最外层的元素。
<html> 标签是所有其他 HTML 元素(除了 <!DOCTYPE> 标签)的容器。
HTML 4.01 与 HTML5之间的差异
HTML5 中,增加了一个新属性:manifest。
HTML 与 XHTML 之间的差异
xmlns 属性在 XHTML 中是必需的,但在 HTML中不是。
然而,即使 XHTML 文档中的 <html> 没有使用 xmlns 属性,W3C 上的 HTML 验证器也不会报错。这是因为 "xmlns=http://www.w3.org/1999/xhtml" 是一个固定值,即使您没有包含它,此值也会被添加到 <html> 标签中。
属性
New :HTML5 中的新属性。
属性 | 值 | 描述 |
---|---|---|
manifestNew | URL | 定义一个 URL,在这个 URL 上描述了文档的缓存信息。 |
xmlns | http://www.w3.org/1999/xhtml | HTML 不支持。只有 XHTML 支持。 规定 XML 的 namespace 属性(如果您需要您的内容符合 XHTML,则使用这个属性。)。 |
全局属性
<html> 标签支持 HTML 的全局属性。