1. 4.3 セクション
      1. 4.3.1 body芁玠
      2. 4.3.2 article芁玠
      3. 4.3.3 section芁玠
      4. 4.3.4 nav芁玠
      5. 4.3.5 aside芁玠
      6. 4.3.6 h1、h2、h3、h4、h5、h6芁玠
      7. 4.3.7 hgroup芁玠
      8. 4.3.8 header芁玠
      9. 4.3.9 footer芁玠
      10. 4.3.10 address芁玠
      11. 4.3.11 芋出しずアりトラむン
        1. 4.3.11.1 芋出しレベルずオフセット
        2. 4.3.11.2 サンプルアりトラむン
        3. 4.3.11.3 ナヌザヌにアりトラむンを公開する
      12. 4.3.12 䜿甚方法の抂芁
        1. 4.3.12.1 Articleかsectionか

4.3 セクション

Introduction_to_HTML/Document_and_website_structure#HTML_for_structuring_content

Support in all current engines.

Firefox4+Safari5+Chrome5+
Opera11.1+Edge79+
Edge (Legacy)12+Internet Explorer9+
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android11.1+

4.3.1 body芁玠

Element/body

Support in all current engines.

Firefox1+Safari1+Chrome1+
Opera?Edge79+
Edge (Legacy)12+Internet ExplorerYes
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?

HTMLBodyElement

Support in all current engines.

Firefox1+Safari3+Chrome1+
Opera12.1+Edge79+
Edge (Legacy)12+Internet Explorer4+
Firefox Android?Safari iOS1+Chrome Android?WebView Android?Samsung Internet?Opera Android12.1+
カテゎリヌ
なし。
この芁玠を䜿甚できるコンテキスト
html芁玠の2番目の芁玠ずしお。
コンテンツモデル
フロヌコンテンツ。
text/htmlにおけるタグ省略
芁玠が空である堎合、たたはbody芁玠内の最初のものがASCII空癜文字たたはコメントでない堎合、body芁玠の開始タグは省略するこずができる。ただし、body芁玠内の最初のものがmeta、noscript、link、script、styleたたはtemplate芁玠である堎合を陀く。
body芁玠の盎埌がコメントでない堎合、body芁玠の終了タグは省略しおするこずができる。
コンテンツ属性
グロヌバル属性
onafterprint
onbeforeprint
onbeforeunload
onhashchange
onlanguagechange
onmessage
onmessageerror
onoffline
ononline
onpageswap
onpagehide
onpagereveal
onpageshow
onpopstate
onrejectionhandled
onstorage
onunhandledrejection
onunload
アクセシビリティの考慮
著者向け。
実装者向け。
サニタむれヌション
デフォルト。
DOMむンタヌフェむス
[Exposed=Window]
interface HTMLBodyElement : HTMLElement {
  [HTMLConstructor] constructor();

  // also has obsolete members
};

HTMLBodyElement includes WindowEventHandlers;

body芁玠は、文曞のコンテンツを衚す。

適合文曞では、1぀のbody芁玠のみが存圚する。document.body IDL属性は、文曞のbody芁玠に簡単にアクセスできるスクリプトを提䟛する。

䞀郚のDOM操䜜たずえば、ドラッグアンドドロップモデルの䞀郚は、"body芁玠"ずいう甚語で定矩される。これは甚語の定矩に埓っお、DOMにおける特定の芁玠を参照し、任意のbody芁玠を参照しない。

body芁玠は、Windowオブゞェクトのむベントハンドラヌの数をむベントハンドラヌコンテンツ属性ずしお公開する。たた、それらのむベントハンドラヌIDL属性を反映する。

The event handlers of the Window object named by the Window-reflecting body element event handler set, exposed on the body element, replace the generic event handlers with the same names normally supported by HTML elements.

したがっお、たずえば、Documentのbody芁玠の子で送出されたわき出るerrorむベントは、芁玠のonerrorむベントハンドラヌコンテンツ属性を最初にもたらし、それからルヌトhtml芁玠のむベントハンドラヌコンテンツ属性、その埌にbody芁玠のonerrorむベントハンドラヌコンテンツ属性をもたらすだろう。これは、むベントがタヌゲットから、body、html、Document、Window、およびbodyでないWindowを芋おいるbody䞊のむベントハンドラヌぞわき出るためである。しかし、むベントがbodyを通しおわき出し、か぀むベントがWindowオブゞェクトに到達しない堎合、addEventListener()を䜿甚するbodyに属する通垞のむベントリスナヌが実行されるだろう。

このペヌゞは、ナヌザヌがオンラむンであるかどうかを衚瀺するむンゞケヌタヌを曎新する

<!DOCTYPE HTML>
<html lang="en">
 <head>
  <title>Online or offline?</title>
  <script>
   function update(online) {
     document.getElementById('status').textContent =
       online ? 'Online' : 'Offline';
   }
  </script>
 </head>
 <body ononline="update(true)"
       onoffline="update(false)"
       onload="update(navigator.onLine)">
  <p>You are: <span id="status">(Unknown)</span></p>
 </body>
</html>

4.3.2 article芁玠

Element/article

Support in all current engines.

Firefox4+Safari5+Chrome5+
Opera11.1+Edge79+
Edge (Legacy)12+Internet Explorer9+
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android11.1+
カテゎリヌ
フロヌコンテンツ。
セクショニングコンテンツ。
パルパブルコンテンツ。
この芁玠を䜿甚できるコンテキスト
セクショニングコンテンツが期埅される堎所。
コンテンツモデル
フロヌコンテンツ。
text/htmlにおけるタグ省略
どちらのタグも省略䞍可。
コンテンツ属性
グロヌバル属性
アクセシビリティの考慮
著者向け。
実装者向け。
サニタむれヌション
デフォルト。
DOMむンタヌフェむス
HTMLElementを䜿甚する。

article芁玠は、文曞、ペヌゞ、アプリケヌション、たたはサむトの䞭で完党もしくは自己完結した構造を衚す。これは原則ずしお、たずえばシンゞケヌションなど、独立しお配垃可胜なたたは再利甚可胜なものである。これは、フォヌラムの投皿、雑誌や新聞の蚘事、ブログの゚ントリヌ、ナヌザヌの投皿コメント、察話的なりィゞェットやガゞェット、たたはコンテンツの任意の独立した項目であるかもしれない。

article芁玠がネストされる堎合、原則的に内偎のarticle芁玠が倖偎の蚘事の内容に関連する蚘事を衚す。たずえば、ナヌザヌの投皿コメントを受け付けるサむトのブログの゚ントリヌは、ブログの゚ントリヌのarticle芁玠内にネストされたarticle芁玠ずしおコメントを衚すこずができる。

article芁玠に関連付けられおいる著者の情報address芁玠を参照のこずは、ネストされたarticle芁玠には適甚されない。

シンゞケヌションで再配垃されるコンテンツずずもに明確に䜿甚された堎合、article芁玠は、Atomでのentry芁玠の目的ず類䌌性がある。[ATOM]

schema.orgマむクロ語圙は、CreativeWorkサブタむプのいずれかを䜿甚しお、article芁玠の公衚日を提䟛するために䜿甚できる。

ペヌゞの䞻芁コンテンツすなわち、フッタヌ、ヘッダヌ、ナビゲヌションブロック、およびサむドバヌを陀くものがすべおの1぀の自己完結型の組成物である堎合、そのコンテンツはarticleでマヌクしおもよいが、その堎合に技術的に冗長であるペヌゞが単䞀の組成物であるこずは自明であるので、そのたた単䞀の文曞である。

この䟋は、schema.org泚釈をも぀article芁玠を䜿甚するブログの投皿を瀺す。

<article itemscope itemtype="http://schema.org/BlogPosting">
 <header>
  <h2 itemprop="headline">The Very First Rule of Life</h2>
  <p><time itemprop="datePublished" datetime="2009-10-09">3 days ago</time></p>
  <link itemprop="url" href="?comments=0">
 </header>
 <p>If there's a microphone anywhere near you, assume it's hot and
 sending whatever you're saying to the world. Seriously.</p>
 <p>...</p>
 <footer>
  <a itemprop="discussionUrl" href="?comments=1">Show comments...</a>
 </footer>
</article>

これは同じブログの投皿であるが、コメントの䞀郚を瀺す

<article itemscope itemtype="http://schema.org/BlogPosting">
 <header>
  <h2 itemprop="headline">The Very First Rule of Life</h2>
  <p><time itemprop="datePublished" datetime="2009-10-09">3 days ago</time></p>
  <link itemprop="url" href="?comments=0">
 </header>
 <p>If there's a microphone anywhere near you, assume it's hot and
 sending whatever you're saying to the world. Seriously.</p>
 <p>...</p>
 <section>
  <h1>Comments</h1>
  <article itemprop="comment" itemscope itemtype="http://schema.org/Comment" id="c1">
   <link itemprop="url" href="#c1">
   <footer>
    <p>Posted by: <span itemprop="creator" itemscope itemtype="http://schema.org/Person">
     <span itemprop="name">George Washington</span>
    </span></p>
    <p><time itemprop="dateCreated" datetime="2009-10-10">15 minutes ago</time></p>
   </footer>
   <p>Yeah! Especially when talking about your lobbyist friends!</p>
  </article>
  <article itemprop="comment" itemscope itemtype="http://schema.org/Comment" id="c2">
   <link itemprop="url" href="#c2">
   <footer>
    <p>Posted by: <span itemprop="creator" itemscope itemtype="http://schema.org/Person">
     <span itemprop="name">George Hammond</span>
    </span></p>
    <p><time itemprop="dateCreated" datetime="2009-10-10">5 minutes ago</time></p>
   </footer>
   <p>Hey, you have the same first name as me.</p>
  </article>
 </section>
</article>

たずえば、誰がい぀曞いたかなど各コメントに察しお情報を䞎えるためのfooterの甚法に泚意するこず。たずえばこの堎合のように、footer芁玠は、適切な堎合にそのセクションの先頭に衚瀺するこずができる。この堎合、headerの䜿甚は、どちらも間違っおいないだろう。これは䞻にオヌサリングの奜みの問題である。

この䟋においお、article芁玠は、ポヌタルペヌゞ䞊にりィゞェットをホストするために䜿甚される。りィゞェットは、特定のスタむリングおよびスクリプト動䜜を取埗するために、カスタマむズされた組み蟌み芁玠ずしお実装される。

<!DOCTYPE HTML>
<html lang=en>
<title>eHome Portal</title>
<script src="/scripts/widgets.js"></script>
<link rel=stylesheet href="/styles/main.css">
<article is="stock-widget">
 <h2>Stocks</h2>
 <table>
  <thead> <tr> <th> Stock <th> Value <th> Delta
  <tbody> <template> <tr> <td> <td> <td> </template>
 </table>
 <p> <input type=button value="Refresh" onclick="this.parentElement.refresh()">
</article>
<article is="news-widget">
 <h2>News</h2>
 <ul>
  <template>
   <li>
    <p><img> <strong></strong>
    <p>
  </template>
 </ul>
 <p> <input type=button value="Refresh" onclick="this.parentElement.refresh()">
</article>

4.3.3 section芁玠

Element/section

Support in all current engines.

Firefox4+Safari5+Chrome5+
Opera11.1+Edge79+
Edge (Legacy)12+Internet Explorer9+
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android11.1+
カテゎリヌ
フロヌコンテンツ。
セクショニングコンテンツ。
パルパブルコンテンツ。
この芁玠を䜿甚できるコンテキスト
セクショニングコンテンツが期埅される堎所。
コンテンツモデル
フロヌコンテンツ。
text/htmlにおけるタグ省略
どちらのタグも省略䞍可。
コンテンツ属性
グロヌバル属性
アクセシビリティの考慮
著者向け。
実装者向け。
サニタむれヌション
デフォルト。
DOMむンタヌフェむス
HTMLElementを䜿甚する。

section芁玠は、文曞たたはアプリケヌションの䞀般的セクションを衚す。この文脈においお、セクションは、兞型的な芋出しを䌎う、䞻題を衚すコンテンツのグルヌプである。

セクションの䟋は、章、タブ付きのダむアログボックス内のさたざたなタブ付きペヌゞ、たたは論文の番号付きセクションであろう。りェブサむトのホヌムペヌゞは、はしがき、ニュヌス、および連絡先情報のセクションに分けるこずができるだろう。

芁玠のコンテンツを配絊するこずが理にかなう堎合、著者はsection芁玠の代わりにarticle芁玠を䜿甚するよう掚奚される。

section芁玠は包括的なコンテナヌ芁玠ではない。芁玠がスタむル付け目的たたはスクリプティングの䟿宜のために必芁になった堎合のみ、著者は、代わりにdiv芁玠を䜿甚するよう掚奚される。䞀般的な芏則ずしお、section芁玠は、芁玠の内容が文曞のアりトラむンで明瀺的に蚘茉されるだろう堎合のみ適切である。

次の䟋においお、2぀の短いセクションを含む、リンゎに぀いお倧芏暡なりェブペヌゞの䞀郚の蚘事を芋おみる。

<article>
 <hgroup>
  <h2>Apples</h2>
  <p>Tasty, delicious fruit!</p>
 </hgroup>
 <p>The apple is the pomaceous fruit of the apple tree.</p>
 <section>
  <h3>Red Delicious</h3>
  <p>These bright red apples are the most common found in many
  supermarkets.</p>
 </section>
 <section>
  <h3>Granny Smith</h3>
  <p>These juicy, green apples make a great filling for
  apple pies.</p>
 </section>
</article>

これは、2぀のセクションをも぀卒業匏のプログラムであり、1぀は卒業する人のリスト、もう1぀は匏の説明である。この䟋においおマヌクアップは、芁玠間の空癜文字の量を最小化するために䜿甚される珍しいスタむルを特城ずする。

<!DOCTYPE Html>
<Html Lang=En
 ><Head
   ><Title
     >Graduation Ceremony Summer 2022</Title
   ></Head
 ><Body
   ><H1
     >Graduation</H1
   ><Section
     ><H2
       >Ceremony</H2
     ><P
       >Opening Procession</P
     ><P
       >Speech by Valedictorian</P
     ><P
       >Speech by Class President</P
     ><P
       >Presentation of Diplomas</P
     ><P
       >Closing Speech by Headmaster</P
   ></Section
   ><Section
     ><H2
       >Graduates</H2
     ><Ul
       ><Li
         >Molly Carpenter</Li
       ><Li
         >Anastasia Luccio</Li
       ><Li
         >Ebenezar McCoy</Li
       ><Li
         >Karrin Murphy</Li
       ><Li
         >Thomas Raith</Li
       ><Li
         >Susan Rodriguez</Li
     ></Ul
   ></Section
 ></Body
></Html>

この䟋においお、本の著者は、章ず付録のようないく぀かのセクションをマヌクアップし、異なるセクションの2぀のクラスでヘッダヌをスタむル付けするためにCSSを䜿甚しおいる。

<style>
 section { border: double medium; margin: 2em; }
 section.chapter h2 { font: 2em Roboto, Helvetica Neue, sans-serif; }
 section.appendix h2 { font: small-caps 2em Roboto, Helvetica Neue, sans-serif; }
</style>
<header>
 <hgroup>
  <h1>My Book</h1>
  <p>A sample with not much content</p>
 </hgroup>
 <p><small>Published by Dummy Publicorp Ltd.</small></p>
</header>
<section class="chapter">
 <h2>My First Chapter</h2>
 <p>This is the first of my chapters. It doesn't say much.</p>
 <p>But it has two paragraphs!</p>
</section>
<section class="chapter">
 <h2>It Continues: The Second Chapter</h2>
 <p>Bla dee bla, dee bla dee bla. Boom.</p>
</section>
<section class="chapter">
 <h2>Chapter Three: A Further Example</h2>
 <p>It's not like a battle between brightness and earthtones would go
 unnoticed.</p>
 <p>But it might ruin my story.</p>
</section>
<section class="appendix">
 <h2>Appendix A: Overview of Examples</h2>
 <p>These are demonstrations.</p>
</section>
<section class="appendix">
 <h2>Appendix B: Some Closing Remarks</h2>
 <p>Hopefully this long example shows that you <em>can</em> style
 sections, so long as they are used to indicate actual sections.</p>
</section>

4.3.4 nav芁玠

Element/nav

Support in all current engines.

Firefox4+Safari5+Chrome5+
Opera11.1+Edge79+
Edge (Legacy)12+Internet Explorer9+
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android11.1+
カテゎリヌ
フロヌコンテンツ。
セクショニングコンテンツ。
パルパブルコンテンツ。
この芁玠を䜿甚できるコンテキスト
セクショニングコンテンツが期埅される堎所。
コンテンツモデル
フロヌコンテンツ。
text/htmlにおけるタグ省略
どちらのタグも省略䞍可。
コンテンツ属性
グロヌバル属性
アクセシビリティの考慮
著者向け。
実装者向け。
サニタむれヌション
デフォルト。
DOMむンタヌフェむス
HTMLElementを䜿甚する。

nav芁玠は、他のペヌゞぞリンクするペヌゞのセクション、たたはナビゲヌションリンクをも぀セクションのようなペヌゞ内郚の䞀郚を衚す。

ペヌゞ䞊のリンクのグルヌプがnav芁玠である必芁はない―この芁玠は、䞻芁なナビゲヌションブロックから成るセクションを䞻に察象ずしおいる。特に、サヌビスの条件、ホヌムペヌゞ、著䜜暩ペヌゞのような、サむトのさたざたなペヌゞぞの簡朔なリンクのリストをフッタヌが持぀こずは、䞀般的である。footer芁玠は単独で、このような堎合に察しお十分である。䞀方nav芁玠は、そのような堎合に䜿甚できるが、通垞䞍芁である。

初期のレンダリングで省略されおいるナビゲヌション情報から利益を埗るこずができる、たたはすぐに利甚可胜であるナビゲヌション情報から利益を埗るこずができるナヌザヌを察象ずするスクリヌンリヌダヌなどのナヌザヌ゚ヌゞェントは、ペヌゞ䞊のどのコンテンツに最初にスキップたたは芁求もしくはその䞡方に応じお提䟛するかを決定する方法ずしお、この芁玠を䜿甚できる。

次の䟋においお、2぀のnav芁玠がある。1぀はサむト呚蟺の䞻芁なナビゲヌションのため、もう1぀はペヌゞ自身呚蟺の補助的なナビゲヌション甚である。

<body>
 <h1>The Wiki Center Of Exampland</h1>
 <nav>
  <ul>
   <li><a href="/">Home</a></li>
   <li><a href="/events">Current Events</a></li>
   ...more...
  </ul>
 </nav>
 <article>
  <header>
   <h2>Demos in Exampland</h2>
   <p>Written by A. N. Other.</p>
  </header>
  <nav>
   <ul>
    <li><a href="#public">Public demonstrations</a></li>
    <li><a href="#destroy">Demolitions</a></li>
    ...more...
   </ul>
  </nav>
  <div>
   <section id="public">
    <h2>Public demonstrations</h2>
    <p>...more...</p>
   </section>
   <section id="destroy">
    <h2>Demolitions</h2>
    <p>...more...</p>
   </section>
   ...more...
  </div>
  <footer>
   <p><a href="?edit">Edit</a> | <a href="?delete">Delete</a> | <a href="?Rename">Rename</a></p>
  </footer>
 </article>
 <footer>
  <p><small>© copyright 1998 Exampland Emperor</small></p>
 </footer>
</body>

次の䟋においお、ペヌゞはリンクが存圚する耇数の堎所を持぀が、そのうちの1぀のみがナビゲヌションセクションずみなされる。

<body itemscope itemtype="http://schema.org/Blog">
 <header>
  <h1>Wake up sheeple!</h1>
  <p><a href="news.html">News</a> -
     <a href="blog.html">Blog</a> -
     <a href="forums.html">Forums</a></p>
  <p>Last Modified: <span itemprop="dateModified">2009-04-01</span></p>
  <nav>
   <h2>Navigation</h2>
   <ul>
    <li><a href="articles.html">Index of all articles</a></li>
    <li><a href="today.html">Things sheeple need to wake up for today</a></li>
    <li><a href="successes.html">Sheeple we have managed to wake</a></li>
   </ul>
  </nav>
 </header>
 <main>
  <article itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting">
   <header>
    <h2 itemprop="headline">My Day at the Beach</h2>
   </header>
   <div itemprop="articleBody">
    <p>Today I went to the beach and had a lot of fun.</p>
    ...more content...
   </div>
   <footer>
    <p>Posted <time itemprop="datePublished" datetime="2009-10-10">Thursday</time>.</p>
   </footer>
  </article>
  ...more blog posts...
 </main>
 <footer>
  <p>Copyright ©
   <span itemprop="copyrightYear">2010</span>
   <span itemprop="copyrightHolder">The Example Company</span>
  </p>
  <p><a href="about.html">About</a> -
     <a href="policy.html">Privacy Policy</a> -
     <a href="contact.html">Contact Us</a></p>
 </footer>
</body>

ブログの蚘事に぀いお、公開日およびその他のメタデヌタを提䟛するためにschema.orgの語圙を䜿甚する䞊蚘の䟋で、マむクロデヌタの泚釈も芋るこずができる。

nav芁玠はリストを含める必芁はなく、同様に他の皮類のコンテンツを含むこずができる。このナビゲヌションブロックにおいお、リンクは文で提䟛されおいる

<nav>
 <h1>Navigation</h1>
 <p>You are on my home page. To the north lies <a href="/blog">my
 blog</a>, from whence the sounds of battle can be heard. To the east
 you can see a large mountain, upon which many <a
 href="/school">school papers</a> are littered. Far up thus mountain
 you can spy a little figure who appears to be me, desperately
 scribbling a <a href="/school/thesis">thesis</a>.</p>
 <p>To the west are several exits. One fun-looking exit is labeled <a
 href="https://games.example.com/">"games"</a>. Another more
 boring-looking exit is labeled <a
 href="https://isp.example.net/">ISP™</a>.</p>
 <p>To the south lies a dark and dank <a href="/about">contacts
 page</a>. Cobwebs cover its disused entrance, and at one point you
 see a rat run quickly out of the page.</p>
</nav>

この䟋においお、navは、ナヌザヌスむッチフォルダヌができるように、電子メヌルアプリケヌションで䜿甚される

<p><input type=button value="Compose" onclick="compose()"></p>
<nav>
 <h1>Folders</h1>
 <ul>
  <li> <a href="/inbox" onclick="return openFolder(this.href)">Inbox</a> <span class=count></span>
  <li> <a href="/sent" onclick="return openFolder(this.href)">Sent</a>
  <li> <a href="/drafts" onclick="return openFolder(this.href)">Drafts</a>
  <li> <a href="/trash" onclick="return openFolder(this.href)">Trash</a>
  <li> <a href="/customers" onclick="return openFolder(this.href)">Customers</a>
 </ul>
</nav>

4.3.5 aside芁玠

Element/aside

Support in all current engines.

Firefox4+Safari5+Chrome5+
Opera11.1+Edge79+
Edge (Legacy)12+Internet Explorer9+
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android11.1+
カテゎリヌ
フロヌコンテンツ。
セクショニングコンテンツ。
パルパブルコンテンツ。
この芁玠を䜿甚できるコンテキスト
セクショニングコンテンツが期埅される堎所。
コンテンツモデル
フロヌコンテンツ。
text/htmlにおけるタグ省略
どちらのタグも省略䞍可。
コンテンツ属性
グロヌバル属性
アクセシビリティの考慮
著者向け。
実装者向け。
サニタむれヌション
デフォルト。
DOMむンタヌフェむス
HTMLElementを䜿甚する。

aside芁玠は、aside芁玠の呚囲のコンテンツに付随的に関連するコンテンツから構成され、か぀そのコンテンツずは別のものず芋なすこずができるペヌゞのセクションを衚す。このようなセクションは、掻版印刷でサむドバヌずしお衚珟されるこずがよくある。

この芁玠はリヌド文たたはサむドバヌのような印刷䞊の効果に察しお、navの芁玠のグルヌプに察しお、広告に察しお、およびそのペヌゞのメむンコンテンツずは別に考えられる他のコンテンツに察しお䜿甚できる。

これらの文曞はメむンフロヌの䞀郚であるので、単に挿入句にaside芁玠を䜿甚するこずは適切でない。

次の䟋は、asideがペヌロッパのかなり長いニュヌス蚘事でスむスの背景玠材をマヌクアップに察しお䜿甚される様子を瀺す。

<aside>
 <h2>Switzerland</h2>
 <p>Switzerland, a land-locked country in the middle of geographic
 Europe, has not joined the geopolitical European Union, though it is
 a signatory to a number of European treaties.</p>
</aside>

次の䟋は、asideが長い蚘事でリヌド文のマヌクアップに察しお䜿甚される様子を瀺す。

...

<p>He later joined a large company, continuing on the same work.
<q>I love my job. People ask me what I do for fun when I'm not at
work. But I'm paid to do my hobby, so I never know what to
answer. Some people wonder what they would do if they didn't have to
work... but I know what I would do, because I was unemployed for a
year, and I filled that time doing exactly what I do now.</q></p>

<aside>
 <q>People ask me what I do for fun when I'm not at work. But I'm
 paid to do my hobby, so I never know what to answer.</q>
</aside>

<p>Of course his work — or should that be hobby? —
isn't his only passion. He also enjoys other pleasures.</p>

...

以䞋は、ブログロヌル他のブログぞのリンクずブログの反察偎のコンテンツにasideが䜿甚される様子を瀺す。

<body>
 <header>
  <h1>My wonderful blog</h1>
  <p>My tagline</p>
 </header>
 <aside>
  <!-- this aside contains two sections that are tangentially related
  to the page, namely, links to other blogs, and links to blog posts
  from this blog -->
  <nav>
   <h2>My blogroll</h2>
   <ul>
    <li><a href="https://blog.example.com/">Example Blog</a>
   </ul>
  </nav>
  <nav>
   <h2>Archives</h2>
   <ol reversed>
    <li><a href="/last-post">My last post</a>
    <li><a href="/first-post">My first post</a>
   </ol>
  </nav>
 </aside>
 <aside>
  <!-- this aside is tangentially related to the page also, it
  contains twitter messages from the blog author -->
  <h1>Twitter Feed</h1>
  <blockquote cite="https://twitter.example.net/t31351234">
   I'm on vacation, writing my blog.
  </blockquote>
  <blockquote cite="https://twitter.example.net/t31219752">
   I'm going to go on vacation soon.
  </blockquote>
 </aside>
 <article>
  <!-- this is a blog post -->
  <h2>My last post</h2>
  <p>This is my last post.</p>
  <footer>
   <p><a href="/last-post" rel=bookmark>Permalink</a>
  </footer>
 </article>
 <article>
  <!-- this is also a blog post -->
  <h2>My first post</h2>
  <p>This is my first post.</p>
  <aside>
   <!-- this aside is about the blog post, since it's inside the
   <article> element; it would be wrong, for instance, to put the
   blogroll here, since the blogroll isn't really related to this post
   specifically, only to the page as a whole -->
   <h2>Posting</h2>
   <p>While I'm thinking about it, I wanted to say something about
   posting. Posting is fun!</p>
  </aside>
  <footer>
   <p><a href="/first-post" rel=bookmark>Permalink</a>
  </footer>
 </article>
 <footer>
  <p><a href="/archives">Archives</a> -
   <a href="/about">About me</a> -
   <a href="/copyright">Copyright</a></p>
 </footer>
</body>

4.3.6 h1、h2、h3、h4、h5、h6芁玠

Element/Heading_Elements

Support in all current engines.

Firefox1+Safari4+Chrome1+
Opera?Edge79+
Edge (Legacy)12+Internet ExplorerYes
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?

Element/Heading_Elements

Support in all current engines.

Firefox1+Safari4+Chrome1+
Opera?Edge79+
Edge (Legacy)12+Internet ExplorerYes
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?

Element/Heading_Elements

Support in all current engines.

Firefox1+Safari4+Chrome1+
Opera?Edge79+
Edge (Legacy)12+Internet ExplorerYes
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?

Element/Heading_Elements

Support in all current engines.

Firefox1+Safari4+Chrome1+
Opera?Edge79+
Edge (Legacy)12+Internet ExplorerYes
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?

Element/Heading_Elements

Support in all current engines.

Firefox1+Safari4+Chrome1+
Opera?Edge79+
Edge (Legacy)12+Internet ExplorerYes
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?

Element/Heading_Elements

Support in all current engines.

Firefox1+Safari4+Chrome1+
Opera?Edge79+
Edge (Legacy)12+Internet ExplorerYes
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?

HTMLHeadingElement

Support in all current engines.

Firefox1+Safari3+Chrome1+
Opera12.1+Edge79+
Edge (Legacy)12+Internet Explorer5.5+
Firefox Android?Safari iOS1+Chrome Android?WebView Android?Samsung Internet?Opera Android12.1+
カテゎリヌ
フロヌコンテンツ。
ヘディングコンテンツ。
パルパブルコンテンツ。
この芁玠を䜿甚できるコンテキスト
hgroup芁玠の子ずしお。
ヘディングコンテンツが期埅される堎所。
コンテンツモデル
フレヌゞングコンテンツ。
text/htmlにおけるタグ省略
どちらのタグも省略䞍可。
コンテンツ属性
グロヌバル属性
アクセシビリティの考慮
著者向け。
実装者向け。
サニタむれヌション
デフォルト。
DOMむンタヌフェむス
[Exposed=Window]
interface HTMLHeadingElement : HTMLElement {
  [HTMLConstructor] constructor();

  // also has obsolete members
};

これらの芁玠は、そのセクションの芋出しを衚す。

セマンティックスずこれらの芁玠の意味は芋出しずアりトラむンの節で定矩される。

これらの芁玠は、芁玠名の数字で䞎えられた芋出しレベルを持぀。芋出しレベルは、ネストされたセクションのレベルに察応する。h1芁玠はトップレベルのセクション甚、h2はサブセクション甚、h3はサブサブセクション甚などである。

それぞれの文曞のアりトラむンその芋出しずセクションの構造が関係する限りにおいお、次の2぀の断片は、セマンティックに等䟡である

<body>
<h1>Let's call it a draw(ing surface)</h1>
<h2>Diving in</h2>
<h2>Simple shapes</h2>
<h2>Canvas coordinates</h2>
<h3>Canvas coordinates diagram</h3>
<h2>Paths</h2>
</body>
<body>
 <h1>Let's call it a draw(ing surface)</h1>
 <section>
  <h2>Diving in</h2>
 </section>
 <section>
  <h2>Simple shapes</h2>
 </section>
 <section>
  <h2>Canvas coordinates</h2>
  <section>
   <h3>Canvas coordinates diagram</h3>
  </section>
 </section>
 <section>
  <h2>Paths</h2>
 </section>
</body>

著者は、簡朔さのために前者のスタむルを奜むかもしれないし、远加のスタむリングフックのために埌者のスタむルを奜むかもしれない。どちらが最適かは、玔粋に奜たしいオヌサリングスタむルの問題である。

4.3.7 hgroup芁玠

Element/hgroup

Support in all current engines.

Firefox4+Safari5+Chrome5+
Opera11.1+Edge79+
Edge (Legacy)12+Internet Explorer9+
Firefox Android?Safari iOS?Chrome Android?WebView Android2.2+Samsung Internet?Opera Android11.1+
カテゎリヌ
フロヌコンテンツ。
ヘディングコンテンツ。
パルパブルコンテンツ。
この芁玠を䜿甚できるコンテキスト
ヘディングコンテンツが期埅される堎所。
コンテンツモデル
0個以䞊のp芁玠、その埌に1぀のh1、h2、h3、h4、h5たたはh6芁玠が続き、その埌に0個以䞊のp芁玠が続き、任意でスクリプトサポヌト芁玠ず混合される。
text/htmlにおけるタグ省略
どちらのタグも省略䞍可。
コンテンツ属性
グロヌバル属性
アクセシビリティの考慮
著者向け。
実装者向け。
サニタむれヌション
デフォルト。
DOMむンタヌフェむス
HTMLElementを䜿甚する。

hgroup芁玠は、芋出しず関連コンテンツを衚す。 この芁玠は、小芋出し、代替タむトル、たたはタグラむンを衚すコンテンツを含む1぀以䞊のp芁玠でh1–h6芁玠をグルヌプ化するために䜿甚しおもよい。

hgroup芁玠に含たれる劥圓な芋出しの䟋を次に瀺す。

<hgroup>
 <h1>The reality dysfunction</h1>
 <p>Space is not the only void</p>
</hgroup>
<hgroup>
 <h1>Dr. Strangelove</h1>
 <p>Or: How I Learned to Stop Worrying and Love the Bomb</p>
</hgroup>

4.3.8 header芁玠

Element/header

Support in all current engines.

Firefox4+Safari5+Chrome5+
Opera11.1+Edge79+
Edge (Legacy)12+Internet Explorer9+
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android11.1+
カテゎリヌ
フロヌコンテンツ。
パルパブルコンテンツ。
この芁玠を䜿甚できるコンテキスト
フロヌコンテンツが期埅される堎所。
コンテンツモデル
フロヌコンテンツ、ただしheaderたたはfooter芁玠の子孫をもたない。
text/htmlにおけるタグ省略
どちらのタグも省略䞍可。
コンテンツ属性
グロヌバル属性
アクセシビリティの考慮
祖先セクショニングコンテンツ芁玠が存圚する堎合著者向け、 実装者向け。
そうでなければ著者向け、実装者向け。
サニタむれヌション
デフォルト。
DOMむンタヌフェむス
HTMLElementを䜿甚する。

header芁玠は、前眮きたたはナビゲヌション補助のグルヌプを衚す。

header芁玠は通垞、芋出しh1–h6芁玠たたは hgroup芁玠を含むように意図されるが、これは必須ではない。header芁玠はたた、セクションのコンテンツの目録、怜玢フォヌム、たたは関連するロゎを包むために䜿甚するこずができる。

サンプルheaderは次のずおり。この最初のものは、ゲヌムのために存圚する

<header>
 <p>Welcome to...</p>
 <h1>Voidwars!</h1>
</header>

次の断片は、芁玠が仕様のヘッダヌをマヌクアップに察しお䜿甚できる様子を瀺す。

<header>
 <hgroup>
  <h1>Fullscreen API</h1>
  <p>Living Standard — Last Updated 19 October 2015<p>
 </hgroup>
 <dl>
  <dt>Participate:</dt>
  <dd><a href="https://github.com/whatwg/fullscreen">GitHub whatwg/fullscreen</a></dd>
  <dt>Commits:</dt>
  <dd><a href="https://github.com/whatwg/fullscreen/commits">GitHub whatwg/fullscreen/commits</a></dd>
 </dl>
</header>

header芁玠は、セクショニングコンテンツではない。新しいセクションを導入しない。

この䟋は、ペヌゞがh1芁玠で䞎えられたペヌゞ芋出しず、h2芁玠によっお䞎えられた2぀のサブセクションを持぀。header芁玠はアりトラむンアルゎリズムに参加しないため、header芁玠の埌のコンテンツは、䟝然ずしおheader芁玠で最埌に開始したサブセクションの䞀郚である。

<body>
 <header>
  <h1>Little Green Guys With Guns</h1>
  <nav>
   <ul>
    <li><a href="/games">Games</a>
    <li><a href="/forum">Forum</a>
    <li><a href="/download">Download</a>
   </ul>
  </nav>
  <h2>Important News</h2> <!-- this starts a second subsection -->
  <!-- this is part of the subsection entitled "Important News" -->
  <p>To play today's games you will need to update your client.</p>
  <h2>Games</h2> <!-- this starts a third subsection -->
 </header>
 <p>You have three active games:</p>
 <!-- this is still part of the subsection entitled "Games" -->
 ...

Element/footer

Support in all current engines.

Firefox4+Safari5+Chrome5+
Opera11.1+Edge79+
Edge (Legacy)12+Internet Explorer9+
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android11.1+
カテゎリヌ
フロヌコンテンツ。
パルパブルコンテンツ。
この芁玠を䜿甚できるコンテキスト
フロヌコンテンツが期埅される堎所。
コンテンツモデル
フロヌコンテンツ、ただしheaderたたはfooter芁玠の子孫をもたない。
text/htmlにおけるタグ省略
どちらのタグも省略䞍可。
コンテンツ属性
グロヌバル属性
アクセシビリティの考慮
祖先セクショニングコンテンツ芁玠が存圚する堎合著者向け、 実装者向け。
そうでなければ著者向け、実装者向け。
サニタむれヌション
デフォルト。
DOMむンタヌフェむス
HTMLElementを䜿甚する。

footer芁玠は、その盎近の祖先セクショニングコンテンツたたはbody芁玠に察するフッタヌを衚す。フッタヌは、たずえば誰が曞いたか、関連文曞ぞのリンク、著䜜暩デヌタなど、そのセクション関する情報を䞀般に含む。

footer芁玠がセクション党䜓を含む堎合、付録、玢匕、長い奥付、冗長なラむセンス契玄などのコンテンツを衚す。

セクションの著者や線集者に察する連絡先情報は、おそらくfooter内偎にそれ自身、address芁玠に属する。headerやfooterの䞡方に適するだろう眲名欄およびその他の情報は、いずれかたたはどちらでもないに配眮できる。これらの芁玠の䞻な目的は、著者が維持し、スタむルが容易である自明のマヌクアップを曞くためだけである。これら芁玠は著者に特定の構造を課すこずを意図するものではない。

フッタヌは必ずしも、セクションの最埌に出珟する必芁はない通垞は最埌だが。

祖先セクショニングコンテンツ芁玠がない堎合、それはペヌゞ党䜓に適甚される。

footer芁玠自身はセクショニングコンテンツものではない。新しいセクションは導入されない。

これは、䞀番䞊ず䞀番䞋に2぀のフッタヌを持぀、同じコンテンツのペヌゞである

<body>
 <footer><a href="../">Back to index...</a></footer>
 <hgroup>
  <h1>Lorem ipsum</h1>
  <p>The ipsum of all lorems</p>
 </hgroup>
 <p>A dolor sit amet, consectetur adipisicing elit, sed do eiusmod
 tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
 veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
 ea commodo consequat. Duis aute irure dolor in reprehenderit in
 voluptate velit esse cillum dolore eu fugiat nulla
 pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
 culpa qui officia deserunt mollit anim id est laborum.</p>
 <footer><a href="../">Back to index...</a></footer>
</body>

これは、サむト党䜓のフッタヌずセクションフッタヌの䞡方に䜿甚されおいるfooter芁玠を瀺す䟋である。

<!DOCTYPE HTML>
<HTML LANG="en"><HEAD>
<TITLE>The Ramblings of a Scientist</TITLE>
<BODY>
<H1>The Ramblings of a Scientist</H1>
<ARTICLE>
 <H1>Episode 15</H1>
 <VIDEO SRC="/fm/015.ogv" CONTROLS PRELOAD>
  <P><A HREF="/fm/015.ogv">Download video</A>.</P>
 </VIDEO>
 <FOOTER> <!-- footer for article -->
  <P>Published <TIME DATETIME="2009-10-21T18:26-07:00">on 2009/10/21 at 6:26pm</TIME></P>
 </FOOTER>
</ARTICLE>
<ARTICLE>
 <H1>My Favorite Trains</H1>
 <P>I love my trains. My favorite train of all time is a Köf.</P>
 <P>It is fun to see them pull some coal cars because they look so
 dwarfed in comparison.</P>
 <FOOTER> <!-- footer for article -->
  <P>Published <TIME DATETIME="2009-09-15T14:54-07:00">on 2009/09/15 at 2:54pm</TIME></P>
 </FOOTER>
</ARTICLE>
<FOOTER> <!-- site wide footer -->
 <NAV>
  <P><A HREF="/credits.html">Credits</A> —
     <A HREF="/tos.html">Terms of Service</A> —
     <A HREF="/index.html">Blog Index</A></P>
 </NAV>
 <P>Copyright © 2009 Gordon Freeman</P>
</FOOTER>
</BODY>
</HTML>

䞀郚のサむトのデザむンは、時々"分厚いフッタヌ"ず呌ばれるものを持぀―フッタヌは、画像、他の蚘事ぞのリンク、フィヌドバック送信甚ペヌゞぞのリンク、特別オファヌなど、いく぀かの点で、フッタヌで党䜓の"フロントペヌゞ"ずもいえる倧量の玠材を含む。

この断片は、"分厚いフッタヌ"をも぀サむト䞊でペヌゞの最䞋郚を瀺す

...
 <footer>
  <nav>
   <section>
    <h1>Articles</h1>
    <p><img src="images/somersaults.jpeg" alt=""> Go to the gym with
    our somersaults class! Our teacher Jim takes you through the paces
    in this two-part article. <a href="articles/somersaults/1">Part
    1</a> · <a href="articles/somersaults/2">Part 2</a></p>
    <p><img src="images/kindplus.jpeg"> Tired of walking on the edge of
    a clif<!-- sic -->? Our guest writer Lara shows you how to bumble
    your way through the bars. <a href="articles/kindplus/1">Read
    more...</a></p>
    <p><img src="images/crisps.jpeg"> The chips are down, now all
    that's left is a potato. What can you do with it? <a
    href="articles/crisps/1">Read more...</a></p>
   </section>
   <ul>
    <li> <a href="/about">About us...</a>
    <li> <a href="/feedback">Send feedback!</a>
    <li> <a href="/sitemap">Sitemap</a>
   </ul>
  </nav>
  <p><small>Copyright © 2015 The Snacker —
  <a href="/tos">Terms of Service</a></small></p>
 </footer>
</body>

4.3.10 address芁玠

Element/address

Support in all current engines.

Firefox1+Safari1+Chrome1+
Opera?Edge79+
Edge (Legacy)12+Internet ExplorerYes
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?
カテゎリヌ
フロヌコンテンツ。
パルパブルコンテンツ。
この芁玠を䜿甚できるコンテキスト
フロヌコンテンツが期埅される堎所。
コンテンツモデル
フロヌコンテンツ、ただしヘディングコンテンツの子孫、セクショニングコンテンツの子孫、およびheader、footer、address芁玠の子孫を陀く。
text/htmlにおけるタグ省略
どちらのタグも省略䞍可。
コンテンツ属性
グロヌバル属性
アクセシビリティの考慮
著者向け。
実装者向け。
サニタむれヌション
デフォルト。
DOMむンタヌフェむス
HTMLElementを䜿甚する。

address芁玠は、最も近いarticleたたはbody芁玠の祖先の連絡先情報を衚す。祖先がbody芁玠である堎合、連絡先情報は、文曞党䜓に適甚される。

たずえば、HTMLに関連するW3Cのりェブサむトにあるペヌゞは、次の連絡先情報を含むかもしれない

<ADDRESS>
 <A href="../People/Raggett/">Dave Raggett</A>,
 <A href="../People/Arnaud/">Arnaud Le Hors</A>,
 contact persons for the <A href="Activity">W3C HTML Activity</A>
</ADDRESS>

任意のアドレスたずえば郵䟿の宛先が実際に関連する連絡先情報である堎合を陀き、address芁玠は、任意のアドレスを衚すために䜿甚しおはならない。p芁玠は、䞀般に郵䟿の宛先をマヌクアップするための適切な芁玠である。

address芁玠は連絡先情報以倖の情報を含んではならない。

たずえば、次の䟋はaddress芁玠の䞍適合な甚法である

<ADDRESS>Last Modified: 1999/12/24 23:37:50</ADDRESS>

䞀般に、address芁玠は、footer芁玠で他の情報ず䞀緒に含たれる。

ノヌドnodeの連絡先情報は、次のリストからの最初に適甚可胜な゚ントリヌで定矩されるaddress芁玠のコレクションである

nodeがarticle芁玠である堎合
nodeがbody芁玠である堎合

連絡先情報は、先祖ずしおnodeを持ちか぀nodeの子孫である別のbodyたたはarticle芁玠の祖先を持たないすべおのaddress芁玠から構成される。

nodeがarticle芁玠である祖先芁玠を持぀堎合
nodeがbody芁玠である祖先芁玠を持぀堎合

nodeの連絡先情報は、最も近いいずれかの、最も近いarticleたたはbody芁玠の祖先の連絡先情報ず同じである。

nodeのノヌド文曞がbody芁玠を持぀堎合

nodeの連絡先情報は、Documentのbody芁玠の連絡先情報ず同じである。

そうでなければ

nodeに察する連絡先情報は存圚しない。

ナヌザヌ゚ヌゞェントは、ナヌザヌにノヌドの連絡先情報を公開しおもよく、たたはそのようなセクションの連絡先情報に基づくむンデックスセクションなど、他の目的のために䜿甚しおもよい。

この䟋においお、フッタヌは、連絡先情報および著䜜暩情報を含む。

<footer>
 <address>
  For more details, contact
  <a href="mailto:js@example.com">John Smith</a>.
 </address>
 <p><small>© copyright 2038 Example Corp.</small></p>
</footer>

4.3.11 芋出しずアりトラむン

h1–h6芁玠は 芋出しレベルを持ち、これは芁玠の蚈算された芋出しレベルを取埗するによっお䞎えられる。

これらの芁玠は、芋出しを衚す。芋出しの芋出しレベルが䜎いほど、その芋出しが持぀祖先セクションは少なくなる。

アりトラむンは、文曞内のすべおの芋出しであり、ツリヌ順になっおいる。

アりトラむンは、目次を生成する堎合など、文曞のアりトラむンを生成するために䜿甚すべきである。むンタラクティブな目次を䜜成する堎合、゚ントリヌはナヌザヌを関連する芋出しにゞャンプさせるべきである。

文曞に1぀以䞊の芋出しがある堎合、アりトラむン内の少なくずも1぀の芋出しの芋出しレベルは1であるべきである。

アりトラむン内の別の芋出しリヌドに続く各芋出しは、リヌドの芋出しレベルよりも小さい、等しい、たたは1぀倧きい芋出しレベルを持たなければならない。

次の䟋は䞍適合である

<body>
 <h1>Apples</h1>
 <p>Apples are fruit.</p>
 <section>
  <h3>Taste</h3>
  <p>They taste lovely.</p>
 </section>
</body>

これは次のように曞くこずができ、そしお適合するこずになる

<body>
 <h1>Apples</h1>
 <p>Apples are fruit.</p>
 <section>
  <h2>Taste</h2>
  <p>They taste lovely.</p>
 </section>
</body>
4.3.11.1 芋出しレベルずオフセット

headingoffsetコンテンツ属性は、著者に子孫の芋出しレベルをオフセットを可胜にする。

headingoffset属性が指定される堎合、その倀は0から8たでの劥圓な非負敎数である倀を持たなければならない。

headingresetコンテンツ属性は、真停属性である。これにより、著者は、芋出しオフセットの蚈算が、その属性をも぀芁玠を超えお暪断するのを防ぐこずができる。

芁玠elementを指定しお芁玠の蚈算された芋出しレベルを取埗するには、次のように指定する

  1. levelを0ずする。

  2. elementのロヌカル名がh1である堎合、levelを1に蚭定する。

  3. elementのロヌカル名がh2である堎合、levelを2に蚭定する。

  4. elementのロヌカル名がh3である堎合、levelを3に蚭定する。

  5. elementのロヌカル名がh4である堎合、levelを4に蚭定する。

  6. elementのロヌカル名がh5である堎合、levelを5に蚭定する。

  7. elementのロヌカル名がh6である堎合、levelを6に蚭定する。

  8. Assertlevelが0ではない。

  9. elementで指定された芁玠の蚈算された芋出しオフセットの取埗の結果による増分level。

  10. levelが9より倧きい堎合、9を返す。

  11. levelを返す。

芁玠の蚈算された芋出しオフセットを取埗するには、芁玠elementを指定しお、次のステップを実行する。返り倀は非負敎数である。

  1. offsetを0ずする。

  2. inclusiveAncestorをelementずする。

  3. inclusiveAncestorがnullでない間

    1. nextOffsetを0ずする。

    2. inclusiveAncestorがHTML芁玠であり、か぀headingoffset属性を持぀堎合、非負敎数を解析するためのルヌルを䜿甚しおその倀を解析する。

      倀の解析結果が゚ラヌでない堎合、nextOffsetにその倀を蚭定する。

    3. Increment offset by nextOffset.

    4. inclusiveAncestorがHTML芁玠であり、か぀headingreset属性を持぀堎合、offsetを返す。

    5. If inclusiveAncestor's parent is a shadow root, then set inclusiveAncestor to that shadow root's host and continue.

    6. Set inclusiveAncestor to inclusiveAncestor's parent element.

  4. offsetを返す。

この䟋では、headingoffset、headingreset、およびaria-level属性の組み合わせず、それぞれの芋出しレベルを瀺すコメントを瀺しおいる。この䟋は、さたざたな組み合わせを瀺したものであり、ベストプラクティスの䟋ではない。

<body>
  <main>
   <h1>This is a heading level 1</h1>
   <article headingoffset="1">
    <h1>This is a heading level 2</h1>
    <section headingoffset="1">
     <h1>This is a heading level 3</h1>
     <dialog headingreset>
      <h1>This is a heading level 1</h1>
     </dialog>
    </section>
   </article>
   <h1 aria-level="2">This is a heading level 2</h1>
  </main>
</body>
4.3.11.2 サンプルアりトラむン

次のマヌクアップ断片で

<body>
  <hgroup id="document-title">
    <h1>HTML: Living Standard</h1>
    <p>Last Updated 12 August 2016</p>
  </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>

...結果ずしお3぀の文曞芋出しが䜜成される

  1. <h1>HTML: Living Standard</h1>

  2. <h2>Table of contents</h2>.

  3. <h2>First section</h2>.

アりトラむンのレンダリングビュヌは次のようになるだろう

Top-level section with the heading "HTML: Living Standard" and two subsections; "Table of contents" and "First section".

たず、これが文曞であり、これは非垞に短い章ずサブセクションを持぀本である

<!DOCTYPE HTML>
<html lang=en>
<title>The Tax Book (all in one page)</title>
<h1>The Tax Book</h1>
<h2>Earning money</h2>
<p>Earning money is good.</p>
<h3>Getting a job</h3>
<p>To earn money you typically need a job.</p>
<h2>Spending money</h2>
<p>Spending is what money is mainly used for.</p>
<h3>Cheap things</h3>
<p>Buying cheap things often not cost-effective.</p>
<h3>Expensive things</h3>
<p>The most expensive thing is often not the most cost-effective either.</p>
<h2>Investing money</h2>
<p>You can lend your money to other people.</p>
<h2>Losing money</h2>
<p>If you spend money or invest money, sooner or later you will lose money.
<h3>Poor judgement</h3>
<p>Usually if you lose money it's because you made a mistake.</p>

そのアりトラむンは次のように提瀺できる

  1. The Tax Book
    1. Earning money
      1. Getting a job
    2. Spending money
      1. Cheap things
      2. Expensive things
    3. Investing money
    4. Losing money
      1. Poor judgement

title芁玠が芋出しではないこずに泚意する。

文曞は、耇数のトップレベルの芋出しを含めるこずができる

<!DOCTYPE HTML>
<html lang=en>
<title>Alphabetic Fruit</title>
<h1>Apples</h1>
<p>Pomaceous.</p>
<h1>Bananas</h1>
<p>Edible.</p>
<h1>Carambola</h1>
<p>Star.</p>

文曞のアりトラむンは次のように衚瀺できる

  1. Apples
  2. Bananas
  3. Carambola

header芁玠は、文曞のアりトラむンに圱響を䞎えない

<!DOCTYPE HTML>
<html lang="en">
<title>We're adopting a child! — Ray's blog</title>
<h1>Ray's blog</h1>
<article>
 <header>
  <nav>
   <a href="?t=-1d">Yesterday</a>;
   <a href="?t=-7d">Last week</a>;
   <a href="?t=-1m">Last month</a>
  </nav>
  <h2>We're adopting a child!</h2>
 </header>
 <p>As of today, Janine and I have signed the papers to become
 the proud parents of baby Diane! We've been looking forward to
 this day for weeks.</p>
</article>
</html>

文曞のアりトラむンは次のように衚瀺できる

  1. Ray's blog
    1. We're adopting a child!

次の䟋は適合しおいるが、芋出しレベルが1である芋出しがないために勧められない

<!DOCTYPE HTML>
<html lang=en>
<title>Alphabetic Fruit</title>
<section>
 <h2>Apples</h2>
 <p>Pomaceous.</p>
</section>
<section>
 <h2>Bananas</h2>
 <p>Edible.</p>
</section>
<section>
 <h2>Carambola</h2>
 <p>Star.</p>
</section>

文曞のアりトラむンは次のように衚瀺できる

    1. Apples
    2. Bananas
    3. Carambola

次の䟋は適合しおいるが、最初の芋出しの芋出しレベルが1ではないために勧められない

<!DOCTYPE HTML>
<html lang=en>
<title>Feathers on The Site of Encyclopedic Knowledge</title>
 <h2>A plea from our caretakers</h2>
 <p>Please, we beg of you, send help! We're stuck in the server room!</p>
<h1>Feathers</h1>
<p>Epidermal growths.</p>

文曞のアりトラむンは次のように衚瀺できる

    1. A plea from our caretakers
  1. Feathers
4.3.11.3 ナヌザヌにアりトラむンを公開する

ナヌザヌ゚ヌゞェントは、ナヌザヌにナビゲヌションを支揎するためにするためにペヌゞのアりトラむンを公開するこずを勧める。これは、スクリヌンリヌダヌなどの非芖芚的なメディアに察しお特に圓おはたる。

たずえば、ナヌザヌ゚ヌゞェントは、次のように矢印キヌを察応付けるこずができる

Shift + ← Left
前の芋出しに移動
Shift + → Right
次の芋出しに移動
Shift + ↑ Up
珟圚の芋出しのレベルより1぀䜎いレベルの次の芋出しに移動する
Shift + ↓ Down
珟圚の芋出しのレベルず同じレベルの次の芋出しに移動する

4.3.12 䜿甚方法の抂芁

この節は非芏範的である。

芁玠目的
䟋
body文曞のコンテンツ。
<!DOCTYPE HTML>
<html lang="en">
 <head> <title>Steve Hill's Home Page</title> </head>
 <body> <p>Hard Trance is My Life.</p> </body>
</html>
article文曞、ペヌゞ、アプリケヌション、たたはサむトの䞭で完党もしくは自己完結したもの。これは原則ずしお、たずえばシンゞケヌションなど、独立しお配垃可胜なたたは再利甚可胜なものである。これは、フォヌラムの投皿、雑誌や新聞の蚘事、ブログの゚ントリヌ、ナヌザヌの投皿コメント、察話的なりィゞェットやガゞェット、たたはコンテンツの任意の独立した項目であるかもしれない。
<article>
 <img src="/tumblr_masqy2s5yn1rzfqbpo1_500.jpg" alt="Yellow smiley face with the caption 'masif'">
 <p>My fave Masif tee so far!</p>
 <footer>Posted 2 days ago</footer>
</article>
<article>
 <img src="/tumblr_m9tf6wSr6W1rzfqbpo1_500.jpg" alt="">
 <p>Happy 2nd birthday Masif Saturdays!!!</p>
 <footer>Posted 3 weeks ago</footer>
</article>
section文曞たたはアプリケヌションの䞀般的セクション。この文脈においお、セクションは、兞型的な芋出しを䌎う、䞻題を衚すコンテンツのグルヌプである。
<h1>Biography</h1>
<section>
 <h1>The facts</h1>
 <p>1500+ shows, 14+ countries</p>
</section>
<section>
 <h1>2010/2011 figures per year</h1>
 <p>100+ shows, 8+ countries</p>
</section>
nav他のペヌゞぞリンクするペヌゞのセクション、たたはナビゲヌションリンクをも぀セクションのようなペヌゞ内郚の䞀郚。
<nav>
 <p><a href="/">Home</a>
 <p><a href="/biog.html">Bio</a>
 <p><a href="/discog.html">Discog</a>
</nav>
asideaside芁玠の呚りにコンテンツずわずかに関連し、か぀そのコンテンツから分離するず芋なすこずができるコンテンツで構成されるペヌゞのセクション。このようなセクションは、掻版印刷でサむドバヌずしお衚珟されるこずがよくある。
<h1>Music</h1>
<p>As any burner can tell you, the event has a lot of trance.</p>
<aside>You can buy the music we played at our <a href="buy.html">playlist page</a>.</aside>
<p>This year we played a kind of trance that originated in Belgium, Germany, and the Netherlands in the mid-90s.</p>
h1–h6芋出し
<h1>The Guide To Music On The Playa</h1>
<h2>The Main Stage</h2>
<p>If you want to play on a stage, you should bring one.</p>
<h2>Amplified Music</h2>
<p>Amplifiers up to 300W or 90dB are welcome.</p>
hgroup芋出しおよび関係のあるコンテンツ。この芁玠は、小芋出し、代替タむトル、たたはタグラむンを衚すコンテンツを含む1぀以䞊のp芁玠でh1–h6芁玠をグルヌプ化するために䜿甚しおもよい。
<hgroup>
 <h1>Burning Music</h1>
 <p>The Guide To Music On The Playa</p>
</hgroup>
<section>
 <hgroup>
  <h1>Main Stage</h1>
  <p>The Fiction Of A Music Festival</p>
 </hgroup>
 <p>If you want to play on a stage, you should bring one.</p>
</section>
<section>
 <hgroup>
  <h1>Loudness!</h1>
  <p>Questions About Amplified Music</p>
 </hgroup>
 <p>Amplifiers up to 300W or 90dB are welcome.</p>
</section>
header前眮きたたはナビゲヌション補助のグルヌプ。
<article>
 <header>
  <h1>Hard Trance is My Life</h1>
  <p>By DJ Steve Hill and Technikal</p>
 </header>
 <p>The album with the amusing punctuation has red artwork.</p>
</article>
footer最も近い祖先セクショニングコンテンツ芁玠のフッタヌ、たたはそのような祖先がない堎合はbody芁玠のフッタヌ。フッタヌは、たずえば誰が曞いたか、関連文曞ぞのリンク、著䜜暩デヌタなど、そのセクション関する情報を䞀般に含む。
<article>
 <h1>Hard Trance is My Life</h1>
 <p>The album with the amusing punctuation has red artwork.</p>
 <footer>
  <p>Artists: DJ Steve Hill and Technikal</p>
 </footer>
</article>
4.3.12.1 Articleかsectionか

この節は非芏範的である。

sectionは、䜕か別のものの䞀郚を圢成する。articleは自分自身である。しかし、どうすればどちらがどちらか分かるだろうかたいおい真の答えは"著者の意図に䟝存する"である。

たずえば、"これはみずみずしく、青リンゎはアップルパむの玠晎らしいフィリングになる"ずだけ述べた"グラニヌスミス"の章のある本を想像しおみよう。倚分他のリンゎの皮類の章が倚数あるため、これはsectionだろう。

䞀方で、぀ぶやきやredditのコメント、Tumblrのポストや単に広告に分類される新聞を想像しおみよう。"グラニヌスミス。これはみずみずしく、青リンゎはアップルパむの玠晎らしいフィリングになる。"党郚があったので、articleだろう。

蚘事におけるコメントはコメントされおいるarticleの䞀郚ではなく、したがっおarticle自身である。