Layout

display

Learn how to use the CSS display property.

CSS display

The display property sets the display for an HTML element.

Syntax

.element {
  display: block;
}

HTML Context Example

<div class="card">
  This is a styled element.
</div>

<style>
.card {
  display: block;
}
</style>

Notes

Experiment in the CSS playground to see how this affects layout and styling.