Unordered Lists
|
An unordered list is a list of items.
With bullets the list items are marked (typically small black circles).
An unordered list starts with the <ul> tag.
Each list item starts with the <li> tag.
|
<ul>
<li>list item1</li>
<li>list item2</li>
</ul>
|
|
In three flavors the bullet comes :
squares <ul type="square">
discs <ul type="disc">
circles <ul type="circle">
|
<ul type="square">
<li>list item1</li>
<li>list item2</li>
</ul>
|
|
|
<ul type="disc">
<li>list item1</li>
<li>list item2</li>
</ul>
|
|
|
<ul type="circle">
<li>list item1</li>
<li>list item2</li>
</ul>
|
|
|
Ordered Lists
|
An ordered list is also a list of items.
The list items are marked with numbers.
An unordered list starts with the <ol> tag.
Each list item starts with the <li> tag.
|
<ol>
<li>list item1</li>
<li>list item2</li>
</ol>
|
|
O/P:
- list item1
- list item2
|
|
Using the start attribute start your ordered list on any number besides 1.
|
<ol start="4" >
<li>list item1</li>
<li>list item2</li>
</ol>
|
|
O/P:
- list item1
- list item2
|
|
There are 4 other types of ordered lists.
You can replace generic numbers with
Roman numberals or letters,both capital and lower-case.
Use the type attribute to change the numbering.
|
<ol type="a">
<li>list item1</li>
<li>list item2</li>
</ol>
|
|
O/P:
- list item1
- list item2
|
|
<ol type="A">
<li>list item1</li>
<li>list item2</li>
</ol>
|
|
O/P:
- list item1
- list item2
|
|
<ol type="i">
<li>list item1</li>
<li>list item2</li>
</ol>
|
|
O/P:
- list item1
- list item2
|
|
<ol type="I">
<li>list item1</li>
<li>list item2</li>
</ol>
|
|
O/P:
- list item1
- list item2
|
|