HTML <h6>标记定义了HTML文档中的第六级标题。该标签通常也称为 <h6>元素。
HTML h6标题:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 h6标签的使用(菜鸟教程 (cainiaojc.com))</title>
</head>
<body>
<h1>Heading 1</h1>
<p>This is the content that would appear under Heading 1.</p>
<h2>Heading 2</h2>
<p>This is the content that would appear under Heading 2.</p>
<h3>Heading 3</h3>
<p>This is the content that would appear under Heading 3.</p>
<h4>Heading 4</h4>
<p>This is the content that would appear under Heading 4.</p>
<h5>Heading 5</h5>
<p>This is the content that would appear under Heading 5.</p>
<h6>Heading 6</h6>
<p>This is the content that would appear under Heading 6.</p>
</body>
</html>
测试看看 ‹/›IEFirefoxOperaChromeSafari
所有主流浏览器都支持 <h6> 标签。
HTML <h6>元素位于<body>标记内。
标题的范围可以从<h1>到<h6>。最重要的标题是<h1>,最不重要的标题是<h6>。
在<h1>,<h2>,<h3>,<h4>和<h5>标题之后找到<h6>标题。不要跳过标题级别。
<h6>标题的字体通常会比<h1>,<h2>,<h3,<h4>和<h5>标题略小。
不要仅使用<h6>标签来应用其他格式。<h6>标签用于定义标题级别,例如在目录中。
在 HTML 4.01 中,<h6> 的 "align" 属性已被废弃。在 HTML 5 中,<h6> 元素的 "align" 属性不被支持。请使用 CSS 来排列元素。
属性 | 值 | 描述 |
---|---|---|
align | left center right justify | HTML5 不支持。HTML 4.01 已废弃。 规定标题中文本的排列。 |
<h6> 标签支持 HTML 的全局属性。
<h6> 标签支持 HTML 的事件属性。
HTML 教程:HTML 标题