1. Broadly divided into 3 categories:
Block elements, inline elements (inline elements), inline block elements
Common block elements:
<div>, <p>,
Common inline elements:
<a>, <span>, <br>, <i>, <em>, <strong>, <label>, <q>, <var>, < Cite>, <code>
Common inline block elements:
<input>
2. Block-level elements:
> Convert inline elements to block elements
A{display:block;}
> Features:
Each block-level element begins with a new line, and the subsequent element is also a row;
The height, width, row height, and top and bottom margins of the element can be set;
The width of the element, if not set, is 100% of the parent container.
3. Inline elements:
> set block elements as inline elements
Div{display:inline;}
> Features:
And the other elements are on the same line;
The height, width, and top and bottom margins of the element are not set;
The width of the element is the width of the text or image it contains and cannot be changed.
4. Inline block elements:
> Set elements to inline block elements
Xxx{display:inline-block;}
> Features:
And the other elements are on the same line;
The width, height, row height, and top and bottom margins of an element can be set.
html--Element Classification Detailed