|
|
 |
Ordered Lists
An ordered list automatically numbers the items. Opening and closing
tags are required. Line breaks are not required in lists. Each new
item in the list assumes a new line.
<ol> - opening tag
</ol> - closing tag
You need to use a list item tag <li>
for each item in your list.
Code Example:
Here are my favorite movies of the
summer:<br>
<ol>
<li>The Iron Giant</li>
<li>Austin Powers: Spy
Who Shagged Me</li> <li>Trick</li>
<li>Star Wars: Phantom Menace</li>
</ol>
Result:
Here are my favorite movies of the summer:
- The Iron Giant
- Austin Powers: Spy Who Shagged Me
- Trick
- Star Wars: Phantom Menace
You can create different types of lists by setting a type variable.
Optional variables are:
type="A" -- list items are designated
with uppercase letters (A, B, C, D, E ...)
-
type="a" -- list items are designated
with lowercase letters (a, b, c, d, e ...)
type="I" -- list items are designated
with uppercase Roman numerals (I, II, III, IV, V ...)
-
type="i" -- list items are designated
with lowercase Roman numerals (i, ii, iii, iv, v ...)
-
type="1" -- list items are numbered
(1, 2, 3, 4, 5 ...) NOTE: this is the default setting if no type
option is applied.
You can also start a list at a value other than 1 with the
start option. For instance, start="4"
would start your list at the number 4. start="6"
type="A" would start your list with the uppercase
letter F.
Code Example:
Reading assignments:<br>
<ol
type="1">
<li>Beginning HTML
<ol type="a">
<li>Document
tags</li>
<li>Formatting tags</li>
<li>List tags</li>
</ol>
</li>
<li>Web
Graphics
<ol type="a" START="4">
<li>Browser-safe
colors</li>
<li>Optimizing the color palette</li>
<li>Copyright
issues</li>
</ol>
</li>
<li>Web Publishing Guidelines</li>
</ol>
Result:
Reading assignments:
- Beginning HTML
- Document tags
- Formatting tags
- List tags
- Web Graphics
- Browser-safe colors
- Optimizing the color palette
- Copyright issues
- Web Publishing Guidelines
|