Block-level elements, inline elements, and inline block elements

Source: Internet
Author: User

1. What is the difference between block-level elements and inline elements?

Block-level element exclusive row

Inline elements can be displayed on a single line, but cannot set the upper and lower padding and margin values.

2, block-level elements and inline elements of the conversion of each other?

Block-level elements in the change-in element: Display:inline;

Inline element to block level element: Display:block;

3, the row inside the block element adjacent layout, how to solve the space between several pixels?

Add a float to an element

4. Common block-level elements, inline elements, and inline block elements?

Block-level elements: Div, H-series, Li, DT, DD, p

Inline elements:span, u, a,, em, b,i,u,em

Inline block elements: Input, IMG, button, Texterea, label.

5, block-level elements, inline element nesting issues? Block-level elements

You can nest inline block elements, inline elements

In-line elements

Nested inline elements, not nested block-level elements

Block-level elements, inline elements, and inline block elements

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.