CSS Layout Tutorial, Step by Step

Dave Ceddia

#articles #pocket

source

Highlights from July 26, 2021

  • Inline elements will squeeze next to each other on one line (and wrap if they have to, just like words in a sentence).
  • Block elements, on the other hand, like to stand alone. In terms of printed console output, you could think of a block element as having a newline before and after it.
  • An inline element won’t prevent block elements inside it from breaking the line.