HTML5におけるセマンティック

ウェブページをセマンティックに構造化するためのHTML要素

このページを共有

新着!私の44ページの電子書籍「CSS in 44 minutes」が発売されました!😃

今すぐ入手 →

# article

どのようなコンテキストにも存在できる、独立したコンテンツブロックを定義します。
独自のヘッダー、フッター、セクションを持つことができます…ブログ投稿のリストに便利です。

例: コピー

私のブログ投稿

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.

コードで投稿されました。
<article>
  <header>
    <h3>
      <a href="/my-blog-post">My blog post</a>
    </h3>
  </header>
  <section>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>
  </section>
  <footer>
    <small>
      Posted on <time datetime="2017-04-29T19:00">Apr 29</time> in <a href="/category/code">Code</a>
    </small>
  </footer>
</article>

# aside

メインコンテンツに関連するコンテンツブロックを定義します。通常はサイドバーとして表示されます。

例: コピー

私のブログ投稿

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.

など。

<main>
  <h1>My blog post</h1>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>
  <p>etc.</p>
</main>

<aside>
  <h3>About the author</h3>
  <p>Frontend Designer from Bordeaux, currently working for Improbable in sunny London.</p>
</aside>

# figcaption

<figure>キャプションを定義します。

例: コピー

HTML Reference logo
HTMLリファレンスのロゴ
<figure>
  <img src="/images/html-reference-logo.png" alt="HTML Reference logo">
  <figcaption>The HTML Reference logo</figcaption>
</figure>

# figure

通常は画像である、独立した単一要素を定義します。

例: コピー

HTML Reference logo
<figure>
  <img src="/images/html-reference-logo.png" alt="HTML Reference logo">
</figure>

# main

ウェブページのメインコンテンツを定義します。サイドバーと共に表示できます。

例: コピー

私のブログ投稿

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.

など。

<main>
  <h1>My blog post</h1>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>
  <p>etc.</p>
</main>

<aside>
  <h3>About the author</h3>
  <p>Frontend Designer from Bordeaux, currently working for Improbable in sunny London.</p>
</aside>

# mark

強調表示されたテキストを定義します。

例: コピー

ウェブ上でコンテンツを作成するためにHTML5を使用します。
We use HTML5 to write <mark>content</mark> on the Web.

# section

ウェブページ内のセクションを定義します。

例: コピー

セクションタイトル

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.

<section>
  <h2>Section title</h2>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>
</section>

# time

24時間制の時刻を定義します。

例: コピー

ゲームはに始まります。
The game starts at <time datetime="2017-04-29T19:00">19:00</time>.

datetime

時間と日付を定義します。

"2017-04-29T19:00"

値は有効な時間文字列である必要があります。