HTML inline elements and block elements

Source: Internet
Author: User

1, block elements are generally more overbearing, it is excluded from the other elements in the same line, such as Div, and the width and height to it function.


2. Inline elements can only hold text or other inline elements, which allow the same line as other inline elements, such as span, but the width and height do not work for it.


3, of course, the block elements and inline elements can be converted to each other, to the block element set Display:inline , or to the inline element set Display:block;


4. Common block elements

    • DIV-Block

    • P-Paragraph

    • H1 ~ h6-Big title

    • Table, form-table, form

    • UL, ol-non-sorted list, sort form

    • HR-Horizontal Split Line


5. Common inline elements

    • A-anchor point

    • Span-inline block

    • BR-line break

    • Input-Enter box

    • IMG-Images

    • Select-Project Site Selection

    • TEXTAREA-Multi-line text input box


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.