Skip to main content

Command Palette

Search for a command to run...

CSS display Property

Published
1 min read
CSS display Property
S

A passionate Full Stack Software Developer 🚀 having an experience of building Web applications with JavaScript and some other cool libraries and frameworks.

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; }

More from this blog

Shubham's blog

66 posts