Перейти к содержанию
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.

display: block puts each box on its own line, inline keeps them side by side, none hides the element

Раздаточный материал

Войти или создать аккаунт

IGCSE, A-Level & AP