In this tutorial, get acquainted with the text formatting as list.
The main purpose of the lists - the creation of a list of any positions. Lists are made up of points, which may be numbered or unnumbered.
A numbered list is called numbered. Numbered lists are used in cases where its position should follow in strict order.
Unnumbered list called marked. Bulleted lists are used for a simple transfer of the positions when their sequence is not important.
The browser displays a list of indented on the left and the distance between the list items less than paragraphs or titles.
For registration lists use the following tags:
- UL - a bulleted list (end tag is required);
- OL - ordered list (the end tag is required);
- LI - list element (end tag is not required);
- DL - a multi-level list (a list of definitions, the end tag is required);
- DT - definition list term (end tag is not required);
- DD - definition of the term (end tag is not required).
Lists can be placed into each other. Such lists are called nested lists. The nesting level is not regulated. Nested lists can include both bulleted and numbered lists.
Lists and paragraphs are block html-page elements like paragraphs and headings.
Fruit: <ul> <li>watermelon; <li>melon; <li>drain; <li>apple. </ul>
|Example numbered list:
Fruit: <ol> <li>watermelon; <li>melon; <li>drain; <li>apple. </ol>
|EXAMPLE nested list:
<ul> <li>Fruit: <ol> <li>orange;; <li> banana;; <li>mango. </ol> <li>Vegetables: <ol> <li>tomato; <li>cucumber; <li>potatoes. </ol> </ul>
|Example definition list::
<dl> <dt>Physics <dd>The science of the world around us <dt>Chemistry <dd>The science of matter </dl>
<UL type="circle"> <UL type="disc"> <UL type="square">
<OL type="1"> - Arabic numerals (1,2,3..); <OL type="A"> - the capital letters (A,B,C..); <OL type="a"> - lowercase letters (a,b,c..); <OL type="I"> - lowercase roman numerals (I,II,III..); <OL type="i"> - lower case Roman numerals. <LI skip="4">
Attribute skip specifies skips the numbering of items (in this case 4).
<OL type="A" start="3">
Attribute start indicates the beginning of a new numbering (in this case the numbering will start from the third letter of the alphabet - C and continued further in alphabetical order).