Home > Web Front-end > CSS Tutorial > What is a block element in css

What is a block element in css

王林
Release: 2023-01-07 11:42:57
Original
3181 people have browsed it

In CSS, block elements are also called row elements, which support all styles. If no height is set, the width of the block element is 100% of the parent's width. The block element takes up one line in the box, even if we set the width.

What is a block element in css

The operating environment of this article: windows10 system, css 3, thinkpad t480 computer.

Block element can also be called a row element. Commonly used tags in layout are:

  • div

  • p

  • ul

  • li

  • ##h1 - h6

  • dl

  • dt

  • dd

The above are all block elements, they are The behaviors in the layout are:

  • Support all styles

  • If the width is not set, the default width is 100% of the parent width

  • The box occupies one line, even if the width is set

Related video tutorial:

css video tutorial

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template