Block-level elements in CSS, inline elements (inline elements)

Source: Internet
Author: User
Tags object object

block element block-level elements
    > As the name implies is the element displayed as a block, height width is a that can be set. For example, our commonly used <div>, <p>, <ul> default states are block-level elements. Block-level elements are more overbearing, the default state occupies an entire line each time, the following content must be a new line to display. Of course, non-block-level elements can also be display:block through CSS, changing them to block-level elements. In addition, there is a special, float also has this function.

inline element inline elements
, and its width is the width of its own text or picture. The <a>, <span>, <em>, which we commonly use, belong to inline elements. Inline elements are displayed as text-like displays and do not occupy a single line alone. Of course, block-level elements can also become inline elements, that is, through the display:inline of CSS, and float to achieve.

As defined in the CSS authoritative guide, "any visible element that is not a block-level element is an inline element, and its performance is in the form of" row layout ". "I'm personally not used to the line layout, because I think block-level elements behave more like" rows ", while inline elements are more like" text "Display properties. It is important to remember that the height width of an inline element is not set, and its width is the width of its own text or image. Since you set the width of the height of half a day after no response to discover, originally this is only an inline element.

block Element
* Address-addresses
* BLOCKQUOTE-block Reference
* Center-centered on aligning
* 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


inline 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


variable Element
a mutable element is a block element or an inline element that determines whether the element is in context.

* Applet-java Applet
* button-buttons
* del-delete text
* Iframe-inline Frame
* ins-inserted text
* Map-image block (map)
* Object-object Object
* Script-client-side scripting

Block-level elements in CSS, inline elements (inline 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.