Lompat ke konten

Spacing — margin and padding

English

Space between boxes

  • Margin is the space outside a box — the gap to its neighbours.
  • margin: 30px; adds 30 pixels on all four sides, outside the border.
  • Padding pushes the content in; margin pushes other boxes away.

Padding adds coloured space inside the box; margin adds empty space outside it

Lembar Kerja

Masuk atau buat akun

IGCSE, A-Level & AP