What is a CSS block-level element? For some friends who just learn css, this problem may not be well understood, then, the next article will introduce you to the
What are the definitions of CSS block-level elements, and what are CSS block-level elements?
The definition of CSS block-level elements
According to the World wide explanation, the block element is displayed exclusively on a single line. Its sibling element must not be in the same row as the other (unless it is out of the document stream). In fact, the popular point is that the block element is generally a container element of other elements that can accommodate other block elements or inline elements. The most common is the P and div Two, said the simple point, is the block element is like a square block, you can put other square blocks, and can be rendered anywhere on the page.
If you still don't understand the CSS block-level element definition above, let's take a look at the three features of CSS block-level elements:
1, each block-level element is a single row, then the element can only be another row, and not two elements of a common line.
2, the height of the element, the width, the row height and the top and bottom margin are all can be set.
3, the width of the element if not set, the default is the width of the parent element.
After reading these three CSS block-level element features, this has a further understanding of CSS elements, then let's take a look at the CSS block-level elements are what?
What are CSS block-level elements?
Common CSS block-level elements:
Address: Addresses. BLOCKQUOTE: Block Reference. Center: Lift the alignment block. Dir: Directory list. Div: Common block-level easy, but also the main tag of CSS layout. DL: Defines the list. Fieldset:form control group. Form: Interactive form. H1–h6: Title. HR: Horizontal divider line. Isindex:input prompt. |
Menu: List of menus. Noframes:frames Optional content (this chunk content is displayed for browsers that do not support frame). NoScript: Optional script content (this content is displayed for browsers that do not support script). OL: Ordered form. P: paragraph. Pre: Formatted text. Table: Tables. UL: Unordered list. |
CSS block-level elements of the introduction is also here, the next article will introduce you about CSS inline elements? The difference between CSS block-level elements and inline elements.