Create nested ordered lists in HTML and CSS

Description

The following code shows how to create nested ordered lists.

Example


<html>
<body>
<p>Here is a nested ordered list:</p>
<!--from   w  ww.ja  v a  2  s .  c o m-->
<ol type="I">
<li>Item one</li>
<li>Item two</li>
<li>Item three</li>
<li>Item four
<ol type="i">
<li>Item 4.1</li>
<li>Item 4.2</li>
<li>Item 4.3</li>
</ol>
</li>
<li>Item Five</li>
</ol>

</body>
</html>

Click to view the demo

The code above generates the following result.

Create nested ordered lists in HTML and CSS