HTML <h5>標記定義了HTML文檔中的第五級標題。該標簽通常也稱為 <h5>元素。
HTML h5標題:
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>HTML5 h5標簽的使用(菜鳥教程 (cainiaoplus.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> </body> </html>測試看看 ?/?
IEFirefoxOperaChromeSafari
所有主流瀏覽器都支持 <h5> 標簽。
HTML <h5>元素位于<body>標記內(nèi)。
標題的范圍可以從<h1>到<h6>。最重要的標題是<h1>,最不重要的標題是<h6>。
在<h1>,<h2>,<h3>和<h4>標題之后找到<h5>標題。不要跳過標題級別。
<h5>標題的字體通常會比<h1>,<h2>,<h3>和<h4>標題略小。
不要僅使用<h5>標簽來應用其他格式。<h5>標簽用于定義標題級別,例如在目錄中。
在 HTML 4.01 中,<h5> 的 "align" 屬性已被廢棄。在 HTML 5 中,<h5> 元素的 "align" 屬性不被支持。請使用 CSS 來排列元素。
屬性 | 值 | 描述 |
---|---|---|
align | left center right justify | HTML5 不支持。HTML 4.01 已廢棄。 規(guī)定標題中文本的排列。 |
<h5> 標簽支持 HTML 的全局屬性。
<h5> 標簽支持 HTML 的事件屬性。
HTML 教程:HTML 標題