Positional attribute Classification elements are divided into three categories: block-level elements, inline elements, row-level block elements
1. Block-level elements (blocks)
Features:
(1) can be set wide height, inner and outer margin;
(2) an exclusive line (i.e. there is a newline before and after);
(3) block-level elements if you do not set the width and height, the width defaults to the width of the parent element. The height is automatically populated based on the content size.
common block-level elements: Div, p, H1, H2......hn,ol,
ul, DL,
Li,
form, table
2. Row-level elements (inline)
Features:
(1) can not set wide height, upper and lower inside, margin.
(the left and right inner and outer margin settings are valid)
(2) Its width and height are automatically filled by its contents.
(3)
other row-level elements coexist in one row
;
Common line-level elements: A, span, I, lable, etc.
3. Inline block Element (Inline-block)
Features: (1) can be set wide height, internal and external margins;
(2) can be in line with other inline elements, elements in the inline;
Common inline elements: input, img
conversion between elements of ================= ========================
display:block; (change element to block-level element)
Display:inline; (Changes the element to a row-level element)
Display:inline-block; (Changes the element to a row-level block Element)(You can change the display of elements in a inline or CSS style to convert three elements)
HTML element categories and conversions