Definition of block-level elements and In-row elements-domineering side-drain little safflower according to CSS specifications, each page element has
DisplayAttribute, used to determine the type of the element. Each element has a default display property value, such as p. Its default display property value is "block ", it becomes a block-level element, and the default display attribute value of a span element is "inline", which is called a "intra-row" element.
P
Block-level elementsIt automatically occupies a certain rectangle space. You can set attributes such as height, width, and internal and external margins to adjust the appearance of the rectangle. In contrast, something like "span" and ""
Line ElementAnd does not have its own independent space. It is attached to other block-level elements. Therefore, it is invalid to set attributes such as height, width, and internal and external margins for row elements.