Lists in HTML are of two, ordered lists and unordered lists . So lets start with at the ordered lists .
Ordered Lists :
<ol> <li>Example-1</li> <li>Example-2</li> <li>Example-3</li> </ol>
Output :
- Example-1
- Example-2
- Example-3
Adding Attributes To ordered Lists :
See these examples and try them yourself .
Example - 1 :
Numbers using attributes :
<ol type="1"> <li>Example-1</li> <li>Example-2</li> <li>Example-3</li> </ol>
Output :
- Example-1
- Example-2
- Example-3
Using Alphabets - Upper and Lower cases :
<ol type="A"> <li>Upper-1</li> <li>Upper-2</li> <li>Upper-3</li> </ol>
<ol type="a"> <li>Lower-1</li> <li>Lower-2</li> <li>Lower-3</li> </ol>
Output :
- Upper-1
- Upper-2
- Upper-3
- Lower-1
- Lower-2
- Lower-3
Using Roman Numbers - Upper and Lower Case :
<ol type="I"> <li>Upper-1</li> <li>Upper-2</li> <li>Upper-3</li> </ol>
<ol type="i"> <li>Lower-1</li> <li>Lower-2</li> <li>Lower-3</li> </ol>
Output :
- Upper-1
- Upper-2
- Upper-3
- Lower-1
- Lower-2
- Lower-3
Unordered Lists :
<ul> <li>Example-1</li> <li>Example-2</li> <li>Example-3</li> </ul>
Output :
- Example-1
- Example-2
- Example-3
You can give different shapes to the bullet by adding some styles . Try these and learn it .
Example - 1 :
Round dot or disc shape :
<ul style="list-style-type:disc"> <li>Example-1</li> <li>Example-2</li> <li>Example-3</li> </ul>
Output :
- Example-1
- Example-2
- Example-3
Circle :
<ul style="list-style-type:circle"> <li>Example-1</li> <li>Example-2</li> <li>Example-3</li> </ul>
Output :
- Example-1
- Example-2
- Example-3
Square Shape :
<ul style="list-style-type:square"> <li>Example-1</li> <li>Example-2</li> <li>Example-3</li> </ul>
Output :
- Example-1
- Example-2
- Example-3
No bullets :
<ul style="list-style-type:none"> <li>Example-1</li> <li>Example-2</li> <li>Example-3</li> </ul>
Output :
- Example-1
- Example-2
- Example-3
Post A Comment:
0 comments: