Display property manages the layout of the HTML Element in Document(Webpage)
In HTML, every element has a default display property. Following are the display properties.
- Block
- Inline
- None
Block
It makes an HTML element to occupy the entire width of the screen. Block level elements
starts with a newline.
Following are some block level elements:
1) <h1> to <h6>
2) <div>
3) <p>
4) <form>
Inline
It makes an HTML element to occupy the necessary width. It does not starts with newline.
Following are some inline level elements:
1) <a>
2) <img>
3) <span>
Display: none
To hide an HTML Element this property is used.
Display properties can be overridden.