Saltar al contenido

Showing and hiding (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.

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

Material

Iniciar sesión o crear cuenta

IGCSE, A-Level & AP