1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

HTMLの超きほん 〜セクション関連要素でつくる文書構造〜

Last updated at Posted at 2022-03-16

セクションってなに?

セクションとは、見出しのあるコンテンツ、文章、意味のまとまりです。

セクション関連の要素

以前は意味のまとまりを単にdiv要素でマークアップしていました。

HTML5では、一般的なセクションを表すsection要素や、
ヘッダー領域・フッター領域を表すheader要素・footer要素など、
特別な意味をもつ要素が追加されました。

引き続きすべてdiv要素で文書構造をつくることもできますが、
新しく追加された要素を使えば、コンテンツごとの役割を明示的にマークアップできます。

新しく追加された要素の種類

要素名 用途
section 一般的なセクション、1セクションにつき1つの見出し(h1~h6)をつける
header ヘッダー領域
main メインコンテンツ領域
footer フッター領域
nav ナビゲーション領域(メニューや目次など)
article 独立した主要コンテンツ(記事ページの本文部分など)
aside 補足的なセクション(サイドバーの広告など)

0316-01.png

(参考: その他の一般的な要素)

一般的な要素についてはこちらにまとめました。

補足

さいごまでお読みいただき、ありがとうございます!

この記事はプログラミング初心者であるわたしが、毎日の学習ログとして書きました。
ご質問やご意見、間違いのご指摘などがあれば、気軽にコメントください。

また、平日にもくもく作業したり質問しあえる仲間も募集しています。
ご興味がある方はTwitterなどでご連絡くださいー!

これからもどうぞよろしくお願いします:rabbit:

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?