【関連記事】●参考
HTML4/XHTML1 から HTML5 への変更点
HTML5 のセクション関連タグ
HTML5 のコンテンツグループ化関連タグ
HTML5 の埋め込みコンテンツ関連タグ
HTML5 のフォーム関連タグ
4.6 Text-level semantics - HTML5
テキストの意味付け関連要素一覧
| 要素 | カテゴリ | タグ内に含むもの | 説明 |
|---|---|---|---|
time |
flow content phrasing content |
phrasing content (time 要素を除く) |
時刻または日付 (時刻とタイムゾーンをつけてもよい) を表す。 |
mark |
flow content phrasing content |
phrasing content | テキストの一部を強調表示するのに使う。em や strong と異なり、本来の文章の意図とは別の意味付けから強調したい場合に用いる (あとから蛍光ペンでマーカーをつける感覚)。たとえば以下の状況で使われる。
|
ruby |
flow content phrasing content |
phrasing content の後に rt 要素 1 つまたは rp 要素 1 つと rt 要素 1 つと別の rp 要素 1 つを組み合わせたグループ 1 つ以上 |
ルビを振る。 |
rt |
なし | phrasing content | |
rp |
なし | phrasing content | |
wbr |
flow content phrasing content |
なし | 改行可能位置を示す。 |
time 要素の属性 (グローバル属性を除く)
| 属性名 | 説明 |
|---|---|
datetime |
日付または時刻を表す。 この属性が指定されない場合、日付または時刻は要素の内容で指定される。
|
pubdate |
ブール属性。 指定すると、直近の親の article 要素の発行日時を表す。article 要素が存在しなければ、文書全体の発行日時となる。この属性を指定した場合、日付は必須。 article 要素または文書に対して、pubdate 属性を持つ time 要素は複数指定できない。 |
例
W3C の仕様書から、いくつか例を引用。(1)
time 要素を使った hCalendar の例<div class="vevent"> <a class="url" href="http://www.web2con.com/">http://www.web2con.com/</a> <span class="summary">Web 2.0 Conference</span>: <time class="dtstart" datetime="2007-10-05">10月5日</time> - <time class="dtend" datetime="2007-10-20">19日</time>、 <span class="location">アージェント・ホテル (カリフォルニア州サンフランシスコ)</span>にて </div>mark で強調表示する例<p lang="en-US">Consider the following quote:</p><blockquote lang="en-GB"> <p>Look around and you will find, no-one's really <mark>colour</mark> blind.</p></blockquote><p lang="en-US">As we can tell from the <em>spelling</em> of the word,the person writing this quote is clearly not American.</p><ruby> 漢 <rp>(</rp><rt>かん</rt><rp>)</rp> 字 <rp>(</rp><rt>じ</rt><rp>)</rp></ruby>wbr を使って長い1語を途中改行できるようにした例<p>So then he pointed at the tiger and screamed"there<wbr>is<wbr>no<wbr>way<wbr>you<wbr>are<wbr>ever<wbr>going<wbr>to<wbr>catch<wbr>me"!</p>タグ:HTML5

