First, List
There are three common list types in HTML, namely:
1, unordered list, is a group label describing the semantics of the list, there is no order between each item in the list;
1) Group label: The group label is composed of a plurality of labels, a whole, they exist together; for example: UL label, OL label, DL label;
2) UL: is the English unordered list "unordered lists" meaning;
3) Li: Is the English list item "listing item" meaning;
4) The UL tag can only store Li tags, li tags can not exist alone , but the Li tag is a container-level label , inside can put anything, including the storage of UL tags, are wrong:
UL tags can only store li tags:
The LI tag cannot exist alone either:
5), unordered list of web use: Navigation bar;
2, ordered list: The sequence table is a description of the list semantics of the group label, the list of items in a sequential order;
1) OL is the English ordered list "ordered lists" meaning;
2) Li is an english list item "list item" meaning;
3)ol label can only exist Li tags, li tags can not exist alone, and Li tag is a container-level label, inside can store anything;
4) The use of Web pages with sequential lists, in the actual development, people are accustomed to using unordered list to replace the ordered table, so there is not often a sequence table;
3. Definition list: The definition list is also a group label used to describe the semantics of the list, which is used to define the text;
1) DL-English is the definition list "definitions" meaning;
2) DT English is the definition title "define the headline" meaning;
3) DD English is defined as definition description "description" meaning;
4) The DL label can only contain DT, DD label, and DT, DD label can only exist in the DL tag, and DT, DD tag is a container-level label, inside can store anything;
5) Define various variants of the list and apply flexibly:
A DT can be followed by multiple DD, the function is multiple DD common to describe DT:
The following scenario is allowed, except that the first DT will not have a DD to describe:
There are multiple DT, DD combinations in a DL:
Because DD is a container-level label, this is also possible:
Ii. Div and Span
1. Div
1), Div is English Division "segmentation" meaning, usually used for layout pages, that is, the so-called "layout label";
2),Div in the browser, the default is no display effect, but added a div tag, the semantics will change, div range of labels into a region;
3), Div is a container-level label, inside can store anything, including div;
2. Span
1) The span tag also describes the "small area, small range " semantics, but span belongs to the text-level label, so span, can only hold text, pictures, table elements ;
HTML List (group label) +div (Layout label) and span