Friday 6 July 2012

CSS Display - Block and Inline Elements

CSS Display - Block and Inline Elements

A block element is an element that takes up the full width available, and has a line break before and after it.
Examples of block elements:
  • <h1>
  • <p>
  • <div>
An inline element only takes up as much width as necessary, and does not force line breaks.
Examples of inline elements:
  • <span>
  • <a>

No comments:

Post a Comment