<?xml version="1.0" encoding="utf-8"?>

Block-level elements

Block-level elements

Block-level elements create a rectangular box that takes up the full width of their container. They always start on a new line and push whatever comes next to the next line too.

Some common block-level elements are:

  • <p> for paragraphs
  • <h1> to <h6> for headings
  • <div> for grouping content

These elements help structure the layout by breaking the content into blocks.

Improve your UX & Product skills with interactive courses that actually work