The difference between an element and a block-level element in an HTML row

Source: Internet
Author: User

Within the standard document flow, block-level elements have the following characteristics:

① always starts on a new line and occupies a whole line;
② height, row height, margin and inner margin can be controlled;
③ width is always the same as the browser width, regardless of the content;
④ it can accommodate inline elements and other block elements.

Features of inline elements:

① and other elements are on one line;
② height, row height and margin and inner margin part can be changed;
③ width is only related to content;
④ elements in rows can only hold text or other inline elements.
It is not possible to set the width of the height, as the content of the increase, the altitude varies with the font size, the inline element can set the outer boundary, but the outer boundary does not work up and down, only to the left and right, can also set the inner boundary, but the inner boundary in the IE6 does not work, only to the left and right

Common block-level elements and inline elements:
1 elements (block Element)

* Address-addresses
* BLOCKQUOTE-Block reference
* Center-align Block
* DIR-List of directories
* Div-Common block-level easy, is also the main tag of CSS layout
* DL-Definition List
* Fieldset-form control Group
* Form-Interactive form
* H1-Big title
* H2-Subtitle
* H3-3 level Title
* H4-4 level Title
* H5-5 level Title
* H6-6 level Title
* HR-Horizontal divider Line
* Isindex-input Prompt
* menu-List of menus
* Noframes-frames Optional content, (for browsers that do not support frame, display this chunk content
* NoScript-Optional script content (this content is displayed for browsers that do not support script)
* Ol-Sort Form
* P-Paragraph
* Pre-formatted text
* Table-form
* ul-Non-sorted list

In-line elements (inline Element)

* A-Anchor point
* ABBR-abbreviation
* Acronym-First word
* B-Bold (not recommended)
* Bdo-bidi Override
* Big-Large font
* BR-line break
* Cite-citation
* Code-computer code (required when referencing the source)
* DFN-Define Fields
* EM-emphasis
* Font-typeface settings (not recommended)
* I-Italic
* img-Images
* Input-Enter box
* KBD-Define keyboard text
* Label-table label
* Q-Short reference
* S-Medium dash (not recommended)
* Samp-Define sample computer code
* Select-Project selection
* Small-Small font text
* span-a common inline container that defines chunks within a text
* Strike-Medium dash
* Strong-Bold Emphasis
* Sub-subscript
* SUP-Superscript
* TEXTAREA-multi-line text input box
* TT-Telex text
* U-Underline
* var-Define Variables

The difference between an element and a block-level element in an HTML row

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.