HTML element categories and conversions

Source: Internet
Author: User

Positional attribute Classification elements are divided into three categories: block-level elements, inline elements, row-level block elements

1. Block-level elements (blocks)

Features: (1) can be set wide height, inner and outer margin; (2) an exclusive line (i.e. there is a newline before and after); (3) block-level elements if you do not set the width and height, the width defaults to the width of the parent element. The height is automatically populated based on the content size. common block-level elements: Div, p, H1, H2......hn,ol, ul, DL, Li, form, table           2. Row-level elements (inline) Features: (1) can not set wide height, upper and lower inside, margin. (the left and right inner and outer margin settings are valid) (2) Its width and height are automatically filled by its contents. (3) other row-level elements coexist in one row ; Common line-level elements: A, span, I, lable, etc.   3. Inline block Element (Inline-block) Features: (1) can be set wide height, internal and external margins; (2) can be in line with other inline elements, elements in the inline; Common inline elements: input, img   conversion between elements of ================= ======================== display:block; (change element to block-level element) Display:inline; (Changes the element to a row-level element) Display:inline-block; (Changes the element to a row-level block Element)(You can change the display of elements in a inline or CSS style to convert three elements)

HTML element categories and conversions

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.