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.

ไทย

การไหลของกล่อง

  • บางองค์ประกอบเป็นแบบ Block:它会堆叠在一起并填满宽度 — <div>, <p>, <h1>
  • บางอย่างเป็นแบบ Inline:它会并排排列,只占用所需的空间 — <span>, <a>, <strong>
  • display ช่วยให้คุณ เปลี่ยน องค์ประกอบ behave的方式

องค์ประกอบแบบ Block เรียงต่อกันเป็นบรรทัดใหม่ องค์ประกอบแบบ Inline วางเรียงกันด้านข้าง ไม่แสดงการซ่อน

Handout · ⁨เอกสารประกอบการเรียน⁩

Log in or create account · ⁨เข้าสู่ระบบหรือสร้างบัญชี⁩

IGCSE, A-Level & AP