1 Block-level elements and inline elements
1 Block-level elements
Occupy a row and cannot be tied to any other elements
Can accept wide, high
If you do not set the width, the width defaults to 100% of the father.
2 in-line elements
Alongside other inline elements
cannot be set wide and high. The default width is the width of the text.
In HTML, we have divided the tags into classes, at that time: text-level, container-level.
Text level: P, span, a, B, I, U, EM
Container level: Div, H Series, Li, DT, DD
The classification of CSS is similar to the above, which is different from P:
All text-level tags are inline elements, except that the p,p is a text-level, but a block-level element.
All container-level tags are block-level elements. 2 block-level elements and the reciprocal conversion of inline elements
1 div{
2 display:inline;
3 Background-color:pink;
4 width:500px;
5 height:500px; }
1 span{
2 Display:block;
3 width:200px;
4 height:200px;
5 Background-color:pink; }