項 目 | 説 明 |
---|---|
記述形式 | <header>~</header> |
対応ブラウザー | H5+ / e9+ / Fx4+ / Op11.1+ / Ch5+ / Sa4.1+ |
種 類 (カテゴリー) |
フロー・コンテンツ,パルパブル・コンテンツ |
置ける場所 | フロー・コンテンツが記入できる場所 |
内包要素 (コンテンツ・モデル) |
フロー・コンテンツ [ただし,header要素,footer要素,main要素 を子孫要素に含まないこと] (コンテンツ・モデル: カテゴリー) |
<header> は,ページやセクションのヘッダ部分を書くために使用します。 <header>~</header> には,h1~h6要素や hgroup要素などの見出しを入れて使用する場合が多いのですが,これらに限定されるわけではありません。 セクションの目次,検索フォーム,関連するロゴなど,そのセクションの概要やナビゲーションに役立つ内容を入れてよいのです。(以下の例を参照。)
なお,<head> とは異なり,<header> には,ブラウザーに表示される内容を書きますので混同しないようにしましょう。
種 類 | 名 称 |
---|---|
【固有属性】 | なし |
【グローバル属性】 | accesskey,class,contenteditable *,
dir, hidden *,id, lang,spellcheck *,style, tabindex,title,translate * |
【ARIA role属性】 で 指定可能な値 (役割) |
banner (既定の役割のため指定対象外), または,presentation |
【ARIA aria-* 属性】 で 指定可能なもの |
ARIA グローバル状態とプロパティ, 指定可能な役割の任意の状態とプロパティ |
種 類 | 名 称 |
---|---|
【よく使うもの】 |
HTMLソース | |
---|---|
HTML <body> ~ </body> |
<header> <hgroup> <h1>Scalable Vector Graphics (SVG) 1.2</h1> <h2>W3C Working Draft 27 October 2004</h2> </hgroup> <dl> <dt>This version:</dt> <dd> <a href="http://www.w3.org/...">http://www.w3.org/...</a> </dd> <dt>Previous version:</dt> <dd> <a href="http://www.w3.org/...">http://www.w3.org/...</a> </dd> <dt>Latest version of SVG 1.2:</dt> <dd> <a href="http://www.w3.org/...">http://www.w3.org/...</a> </dd> <dt>Latest SVG Recommendation:</dt> <dd> <a href="http://www.w3.org/...">http://www.w3.org/...</a> </dd> <dt>Editor:</dt> <dd> Dean Jackson, W3C, <a href="mailto:dean@w3.org">dean@w3.org</a> </dd> <dt>Authors:</dt> <dd> See <a href="#authors">Author List</a> </dd> </dl> </header> |
ブラウザー 表示例 |
---|
Scalable Vector Graphics (SVG) 1.2W3C Working Draft 27 October 2004
|
この文書全体では <link rel="stylesheet" href="style.css"> という記述により、スタイルシートに style.css が指定されていますので、上の例では、<h1> ~ </h1> や <h2> ~ </h2> の表示がこの文書全体と同一の形式になっています。