3. Block elements and elements

Source: Internet
Author: User

3. Block elements and elements

1. elements are divided into block elements and inline elements (intra-row elements ).

1) block element features:

1. Exclusive row by default
2. When there is no width, a row is full by default.
3. supports all css commands

2) block element code: Use common block-level element div and p as an example.

  

<! DOCTYPE html> 

3) The Code effect is as follows:

  

4) commonly used block-level elements:

Address-address
Blockquote-block reference
Center-center alignment Block
Dir-directory list
Div-common block-level containers are also the main labels of css layout.
Dl-definition list
Fieldset-form Control Group
Form-interactive form
H1-title
H2-subtitle
H3-Level 3 title
Level h4-4 title
H5-Level 5 Title
H6-6 level title
Hr-horizontal Separator
Isindex-input prompt
Menu-menu list
Optional content of noframes-frames (content in this block is displayed in browsers that do not support frame)
Noscript-optional script content (this content is displayed in browsers that do not support scripts)
Ol-sort form
P-paragraph
Pre-format text
Table-table
Ul-non-sorted list (unordered list)

5) block-level element Overview

Block elements, also known as block elements, correspond to inline elements. They are all concepts in html standards. Most HTML elements are defined as block-level elements or Inline elements. When a block-level element is displayed in a browser, it usually starts (and ends) with a new line ).

  

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.