Back to CSS

CSS Tutorial

Display and Visibility

Control how elements appear and take space on the page.

The display property controls layout behavior, such as block, inline, flex, and grid.

Visibility and opacity can hide elements while affecting layout differently.

css
.hidden {
  display: none;
}

.invisible {
  visibility: hidden;
}