Skip to content · ⁨コンテンツへスキップ⁩

Showing and hiding (display) · ⁨表示と非表示 (display)⁩

English

How boxes flow

  • Some elements are block: they stack on top of each other and fill the width — <div>, <p>, <h1>.
  • Some are inline: they sit side by side, taking only as much room as they need — <span>, <a>, <strong>.
  • display lets you change which way an element behaves.

日本語

ボックスの配置

  • 一部の要素はブロックです:上下に積み重ねられ、横幅全体を満たします — <div>、<p>、<h1>。
  • 一部の要素はインラインです:横並びに配置され、必要な分のスペースしか取りません — <span>、<a>、<strong>。
  • displayを使って要素の動作方法を変更できます。

ブロック要素は各自の行に積み重なり、インライン要素は横並びで配置され、いずれも非表示にはなりません

Handout · ⁨プリント⁩

Log in or create account · ⁨ログインまたはアカウント作成⁩

IGCSE, A-Level & AP