HTML CSS SQL Meta tag Generator ScrollBar design Generator Encode Decode images

CSS Basics

Introduction Syntax Selectors Attribute Selectors Specificity Combinators !important Comments Colors

CSS Need to Know

Box Model Pseudo-class Pseudo-element Inline-block Math Functions Max and Min Opacity Outline Overflow Z-index Float

Most used

Align Backgrounds Borders Text Units Padding Margins Position Tables Display Fonts Lists Height and Width

CSS Reference

CSS Properties reference CSS Pseudo-Classes reference CSS Pseudo-Elements reference CSS Selector reference

CSS display

The CSS display property specifies the type of box a certain element should generate. It controls how elements are displayed on a web page. There are various values for the display property that can be used to style elements in different ways.

Here are some common values for the display property:

Let's see examples of how these values work in practice.

Result:

    Block Level Element
    Inline Element
    Inline Block Element
    None Element
  

In the example above:

Experiment with different values for the display property to see how they affect the layout of elements on a web page.

.cat {
	box-sizing: content-box;
}