Cyber Code Academy
Tutorials Academy Courses
Home / CSS / CSS Display Property

CSS Display Property

Common display values

.block { display: block; }
.label { display: inline; }
.badge { display: inline-block; }
.hidden { display: none; }
.clearfix { display: flow-root; }

Block elements generally start on a new line. Inline elements flow with text. Inline-block can accept dimensions while remaining inline-level.

Display versus visibility

display: none removes the element from layout. visibility: hidden hides it while preserving its layout space.

Practice

Create a row of inline-block badges, then compare display:none with visibility:hidden.

Want to learn this professionally?

Explore practical IT training at Cyber Code Academy.

View Academy Courses