RSRobince Studio

The Display Property

The display property controls how an element flows on the page. It is one of the most important layout tools in CSS.

  • block: starts on a new line and fills the width
  • inline: flows within text, ignores width and height
  • inline-block: flows inline but accepts width and height
  • none: hides the element completely
span {
  display: inline-block;
  width: 80px;
}
An element set to display none takes up no space at all, unlike visibility hidden which leaves a gap.
Try it yourself

Loading editor…