CSS display Property

CSS display Property

ยท

1 min read

The display property specifies the display behavior (the type of rendering box) of an element.

example->

1) inline:- Displays an element as an inline element (like ). Any height and width properties will have no effect

2) block:- Displays an element as a block element (like

). It starts on a new line, and takes up the whole width

3) flex:- Displays an element as a block-level flex container

4) inline-block:- Displays an element as an inline-level block container. The element itself is formatted as an inline element, but you can apply height and width values

5) inline-grid:- Displays an element as an inline-level grid container

6) table-column:- Let the element behave like a element

7) table-row:- Let the element behave like a element

example->

body { display: inline; }

p { display: inherit; }

ย