Compare list style type, decimal and decimal leading zero in HTML and CSS

Description

The following code shows how to compare list style type, decimal and decimal leading zero.

Example


<html>
<head>
<style type='text/css'>
ol {<!--from ww  w .  j a  v a 2 s .co m-->
font-family: sans-serif;
}
ol#decimal li {
list-style-type: decimal;
}
ol#decimal-leading-zero li {
list-style-type: decimal-leading-zero;
}
</style>
</head>
<body>
<ol id='decimal'>
<li>This is the first list item.</li>
<li>This is the second list item.</li>
<li>This is the third list item.</li>
</ol>
<ol id='decimal-leading-zero'>
<li>This is the first list item.</li>
<li>This is the second list item.</li>
<li>This is the third list item.</li>
</ol>
</body>
</html>

Click to view the demo

The code above generates the following result.

Compare list style type, decimal and decimal leading zero in HTML and CSS