Skip to content

Display

Block, inline, or none

  • Lesson
  • 1 min read
  • 5 of 8 in this chapter

Display

We've already encountered display properties in the HTML course and briefly in the Selectors lesson in this course. HTML has certain default display properties, but you can change them using CSS. diplay: block displays the element on a new line, and as wide as the viewport. display: inline displays the element on the same line as the previous element.

display: none is a fun one, because it makes the element disappear entirely.

There are a few other possible values for this property, some of which we'll cover later in this course.