knowbility
Introduction to CSS

display

display is a CSS property that basically controls line breaking in layouts.

The main values for the display property are:

There are others, but you will almost never use them.

inline keeps and element in the line, without breaking. Objects that are inline do not have vertical margin.

block breaks the line before and after the element. Vertical margins collapse for these objects.

none hides it entirely, yanking it right out of the document (contrast with visible: hidden).

previous | next