display

The display Property

ValueBehaviour
blocknew line, full width; width/height apply
inlineflows in text; width/height ignored
inline-blockflows in text, but width/height/padding apply
noneremoved from the page completely
flex / gridlayout containers (Medium level)

Example

Example

<!DOCTYPE html>
<html>
<head>
  <title>Page Title</title>
  <style>
    span { background: #d0ebff; padding: 4px; }
    .ib { display: inline-block; width: 90px; height: 40px; background: #d3f9d8; }
    .blk { display: block; background: #ffe8cc; }
    .hidden { display: none; }
  </style>
</head>
<body>

<p>inline: <span>one</span> <span>two</span></p>
<p>inline-block: <span class="ib">90×40</span> <span class="ib">90×40</span></p>
<p>block: <span class="blk">I take a full line</span></p>
<p>none: <span class="hidden">you cannot see me</span>(hidden)</p>

</body>
</html>

Result

Note: visibility: hidden hides an element but keeps its space; display: none removes the space too.