Lists
Lists have many uses. Ordered lists typically use numbers. Unordered lists typically use bullets. Definition lists are useful, obviously, for definitions. Other types of lists are less used.
Ordered List
- <ol> ... </ol>
- <li> for each item of the list
- attributes for <ol>
- attributes for <li>
Examples:
Ordered list
<ol>
<li>Item 1 on the list
<li>Item 2 on the list
<li>Item 3 on the list
</ol>
Ordered list
- Item 1 on the list
- Item 2 on the list
- Item 3 on the list
List with type attribute
- Item 1 on the list
- Item 2 on the list
- Item 3 on the list
List with type="I" and start="3'" attributes
- Item 1 on the list
- Item 2 on the list
- Item 3 on the list
List LI value="4" attribute
- Item 1 on the list
- Item 2 on the list
- Item 3 on the list
So, attributes for ordered lists include class, style, start, and type (type can be a capital or lowercase letter, such as A or a, upper or lower case roman numerals, such as I or i, or numbers such as 1, 2, 3, etc.); these attributes are NOT required for the list to work.
Unordered List
- <ul> ... </ul>
- <li> for each item of the list
- attribute for <ul>
- type (circle, square, disk)
- attribute for <li>
- type (circle, square, disk)
Examples:
Unordered list
<ul>
<li>Item 1 on the list
<li>Item 2 on the list
<li>Item 3 on the list
</ul>
Unordered list
- Item 1 on the list
- Item 2 on the list
- Item 3 on the list
List with type="square" attribute
- Item 1 on the list
- Item 2 on the list
- Item 3 on the list
So, attributes for unordered lists include class, style, and type (type can be disc, square, or circle); these attributes are NOT required for the list to work.
Definitions
- <dl> ... </dl>
- <dt> for each definition term
- <dd> for each definition
Examples:
<dl>
<dt>.gif
<dd>Graphic file format used on the web
<dt>.html
<dd>ASCII formatted file containing HTML tags
</dl>
Renders as:
- .gif
- Graphic file format used on the web
- .html
- ASCII formatted file containing HTML tags
|