Loading Please Wait...
Ordered lists are defined by <ol> tag and each list item is defined by <li> tag.
By default each item is marked with numbers (starting from 1) but this can be change by CSS style.
<!DOCTYPE html>
<html>
<body>
<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ol>
</body>
</html>
We can define list item marker by type attribute. The attribute have the following value
<!DOCTYPE html>
<html>
<body>
<ol type="1">
<li>Item 1</li>
<li>Item 2</li>
</ol>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<ol type="A">
<li>Item 1</li>
<li>Item 2</li>
</ol>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<ol type="a">
<li>Item 1</li>
<li>Item 2</li>
</ol>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<ol type="I">
<li>Item 1</li>
<li>Item 2</li>
</ol>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<ol type="i">
<li>Item 1</li>
<li>Item 2</li>
</ol>
</body>
</html>
We can define list item marker by list-style-type CSS property as well. The property :have the following value
<!DOCTYPE html>
<html>
<body>
<ol style="list-style-type: armenian;">
<li>Item 1</li>
<li>Item 2</li>
</ol>
</body>
</html>
By default list counting start from 1 but you can change it from start attribute.
<!DOCTYPE html>
<html>
<body>
<ol start="13">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ol>
</body>
</html>
We can define define nested list (lists inside another list).
<!DOCTYPE html>
<html>
<body>
<ol>
<li>Item 1</li>
<li>Item 2
<ol>
<li>Item 2.1</li>
<li>Item 2.2</li>
</ol>
</li>
</ol>
</body>
</html>
How you feel about this blog:
Share this blog on:
If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com
Contact UsWe are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..
Copyright ©
, Lynxsia IT Solutions, All rights reserved