Directory
- Block-level elements
- Inline elements
- Inline block-level elements
- Summarize
Block-level elements (blocks)
definition : By default, the element that is exclusive to a row is a block-level element.
features :
- Each block-level element begins with a new row, and the subsequent element also starts another line. (True overbearing, one block-level element exclusive row)
- The height, width, row height, and top and bottom margins of an element can be set
- The element width is not set, and it is 100% of the parent container itself (and the width of the parent element is the same).
common block-level elements :<div>, <p>,
Two, inline elements (inline)
definition : inline element, also called inline element. By default, elements that are not set on the same line as the other elements, and the height, width, and so on of an element are inline elements.
features :
- And the other elements are on one 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 Picture it contains, and it cannot be changed.
Common inline Elements :<a>, <span>, <br>, <i>, <em>, <strong>, <label>, <q> , <var>, <cite>, <code>
Three, inline block elements (Inline-block)
definition : By default, the elements that can be set on the same line as the other elements and the height, width, etc. of the element are inline elements
features :
- And the other elements are on one line;
- The height, width, row height, and top and bottom margins of an element can be set.
common inline block-level elements :, <input>
Iv. Summary
Regardless of the element, they can be converted to each other through the display property in CSS.
Back-end programmer front-end path 04--html element classification