Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 588 Bytes

05.css-display-property.md

File metadata and controls

24 lines (17 loc) · 588 Bytes

The display property defines how an element is displayed. Common values include block, inline, inline-block, and none.

Example:

<div class="block-example">Block Element</div>
<span class="inline-example">Inline Element</span>

CSS Example:

.block-example {
  display: block;
}

.inline-example {
  display: inline;
}

A block element takes up the full width available, with a new line before and after. An inline element only takes up as much width as necessary.