HTML/CSS----Element Classification

Source: Internet
Author: User

Standard document Flow

Standard flow refers to the arrangement rules of various elements when other special CSS rules related to permutation and positioning are not used. is the default arrangement for CSS.

Elements in an HTML document can be divided into two main categories: inline and block-level elements .

inline element (inline element)

1. Similar to the way text is displayed, row by line display.

2. Width and height are not supported, and their widths change as the content increases with the font size

3. Inline elements can only hold text or other inline elements.

4. The inline element does not form a new content block, that is, there can be other elements around it.

Elements with a 5.display attribute equal to "inline" are all inline elements.

Classification:
A-anchor point
B-Bold (not recommended)
BR-line break
EM-emphasize
Font-typeface settings (not recommended)
I-Italic
IMG-Images
Input-Enter box
Label-Table Label
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

Block-level elements (blocks element)

  1. The front and back lines are displayed, and the default state is exclusive.

2. Height, row height, and margin and inner margin are controllable.

3. Block-level elements are often used as containers and can contain additional row-level, block-level elements.

4. Typical block-level elements are:<div>, <p>,

5. The Float (float property, float left or right) is set by CSS, and the set display property of "block" or "List-item" is a block-level element.

Category:
* Address-addresses
* BLOCKQUOTE-block Reference
* Center-in the 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

note : See here some people may notice a problem, img-Pictures, input-Input box , textarea-Multiline text input box, these are not line-level elements, not that the row-level elements can not be set and high, these why, there is another point of knowledge, replace elements and no substitution elements .

< Span style= "font-family: italics;" >< Span style= "color: #ff0000;" > and non-replaceable elements

In terms of the characteristics of the elements themselves, they can be divided into replacement and non-replaceable elements.

> Note: The following sections are referenced in http://www.3lian.com three networking

a) Replace element  
1 . The replacement element is the browser based on the element's label and attributes, to determine the element's specific display content.  
For example, the browser will read the image information and display it based on the value of the SRC attribute of the tag, and if the (x) HTML code is viewed, the actual content of the picture is not visible; The Type property of the label determines whether to display an input box, a radio button, and so on.  
2 . ( x) , <input>, <textarea>, <select>, <object> in HTML are all replacement elements. These elements often have no actual content, that is, an empty element, for example:  
<input type= "Submit" name= "submit" value= "Submit"/>   The
browser displays these elements based on the label type and attributes of the element. The replaceable element also generates a box in its display.

3 . All of the replacement elements can be scaled with the height and width properties, such as the label, if the width of a picture is 100px high, then when the height and width are set to auto, the picture remains the same size, However, when set to a different value, scaling occurs.

4 . The replacement element generally has intrinsic dimensions, so it has width and height, which can be set, such as: Do not specify the width and height of IMG, according to its intrinsic size, and for form elements, the browser has a default style.

b) Non-replaceable elements
  1. (x) Most elements of HTML are non-replaceable elements, meaning that their content is displayed directly to the client (for example, a browser). For example:
<p> content of the paragraph </p>
Paragraph <p> is a non-replaceable element, the text "paragraph content" is all displayed.

Display:inline-block set to Inline block-level elements , essentially row-level elements, but support width and height.

  

HTML/CSS----Element Classification

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.