Home  >  Article  >  Web Front-end  >  what is css block element

what is css block element

藏色散人
藏色散人Original
2021-04-23 09:51:372099browse

css block elements refer to block-level elements; block elements are generally container elements for other elements and can accommodate other block elements or inline elements; each block-level element occupies its own line, followed by Elements can only start on a new line, and two elements cannot share the same line.

what is css block element

The operating environment of this article: windows7 system, css3 version, Dell G3 computer.

What is the css block element?

Block-level elements are displayed on their own line. Its sibling elements must not be on the same line as it (unless out of the document flow). In layman's terms, a block element is generally a container element for other elements and can accommodate other block elements or inline elements.

Three characteristics of css block elements:

Each block-level element occupies its own line, and subsequent elements can only start on another line, and cannot Two elements share a row.

The height, width, line height and top and bottom margins of the element can all be set.

If the width of the element is not set, it defaults to the width of the parent element.

What are the common block elements?

what is css block element

[Recommended learning: css video tutorial]

The above is the detailed content of what is css block element. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:what css stands forNext article:what css stands for