Skip to main content

Block vs Inline

HTML elements all have a default display value and most are either block or inline.

Block-level Elements

Block-level elements have the following display properties:

  • start on a new line
  • browsers automatically add some space before and after the element.
  • take up the full width of its container

Inline Elements

Inline elements have the following display properties:

  • does not start on a newline
  • only takes up as much space (width) as necessary
block vs inline
Block elements take up the entire width so the next elements starts on the next line.
More ...

See the W3Schools site for more information on block vs inline display properties.