What is the definition of CSS block-level elements? What are CSS block-level elements?

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.