How to make list-item markers ordered lists with CSS
The below HTML and CSS code example shows you how to make list-item markers ordered lists with CSS.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>this is the title of the web page</title>
<style type="text/css">
ol.decimal {list-style-type: decimal;}
ol.lowerroman {list-style-type: lower-roman;}
ol.upperroman {list-style-type: upper-roman;}
ol.loweralpha {list-style-type: lower-alpha;}
ol.upperalpha {list-style-type: upper-alpha;}
</style>
</head>
<body>
<ol class="decimal">
<li>HTML</li>
<li>XHTML</li>
<li>CSS</li>
</ol>
<ol class="lowerroman">
<li>HTML</li>
<li>XHTML</li>
<li>CSS</li>
</ol>
<ol class="upperroman">
<li>HTML</li>
<li>XHTML</li>
<li>CSS</li>
</ol>
<ol class="loweralpha">
<li>HTML</li>
<li>XHTML</li>
<li>CSS</li>
</ol>
<ol class="upperalpha">
<li>HTML</li>
<li>XHTML</li>
<li>CSS</li>
</ol>
</body>
</html>
The above HTML and CSS code makes the lists below, each with different list item-markers.
- HTML
- XHTML
- CSS
- HTML
- XHTML
- CSS
- HTML
- XHTML
- CSS
- HTML
- XHTML
- CSS
- HTML
- XHTML
- CSS
Use the text editor below to practice making ordered lists with different list-item markers.