HTML <hgroup> 多級別標題群組

<hgroup> 標籤 (tag) 是當內容有主標題及次標題等多個標題 (multi-level heading) 的狀況下使用。

舉個例子:

<!DOCTYPE html>
<title>HTML Standard</title>
<body>
  <hgroup id="document-title">
    <h1>HTML</h1>
    <h2>Living Standard — Last Updated 12 August 2016</h2>
  </hgroup>
  <p>Some intro to the document.</p>
  <h2>Table of contents</h2>
  <ol id=toc>...</ol>
  <h2>First section</h2>
  <p>Some intro to the first section.</p>
</body>

上面例子瀏覽器解析出來的標題 outline 結構會像是:

  • HTML: Living Standard — Last Updated 12 August 2016
    • Table of contents
    • First section