Set list style type decimal in HTML and CSS
Description
The following code shows how to set list style type decimal.
Example
<html>
<head>
<style type='text/css'>
ol {<!-- w w w .j a va2 s.c o m-->
font-family: sans-serif;
}
ol#decimal li {
list-style-type: decimal;
}
</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>
</body>
</html>
The code above generates the following result.
HTML CSS Tutorial Unordered List
Add Padding and margin for List in HTML and...
Add anchor link as list item in HTML and CS...
Compare list-style for all possible values ...
Compare list style, inside, outside, square...
Compare list-style-position inside vs outsi...
Compare list style type, square/disc/circle...
Create a nested list in HTML and CSS
Create and use Entity marker for UL list in...
Create custom bullet marker for UL list in ...
Create three level nested lists in HTML and...
Create unordered list in HTML in HTML and C...
Set UL list-style to none, hide the bullet ...
Set bullet marker and position in HTML and ...
Set image bullet position in HTML and CSS
Set image for UL list bullet in HTML and CS...
Set left margin for UL to indent in HTML an...
Set list style position outside in HTML and...
Set list style position to inside in HTML a...
Set list-style to circle in HTML and CSS
Set list style to disc inside in HTML and C...
Set list style to disc outside in HTML and ...
Set list style to inside in HTML and CSS
Set only a marker image in HTML and CSS
Set only the position for list style in HTM...
Set text in list to indent -0.75em in HTML ...
Set ul list style to circle outside and no ...
Use LI element to create horizontal menu in...
Add Padding and margin for List in HTML and...
Add anchor link as list item in HTML and CS...
Compare list-style for all possible values ...
Compare list style, inside, outside, square...
Compare list-style-position inside vs outsi...
Compare list style type, square/disc/circle...
Create a nested list in HTML and CSS
Create and use Entity marker for UL list in...
Create custom bullet marker for UL list in ...
Create three level nested lists in HTML and...
Create unordered list in HTML in HTML and C...
Set UL list-style to none, hide the bullet ...
Set bullet marker and position in HTML and ...
Set image bullet position in HTML and CSS
Set image for UL list bullet in HTML and CS...
Set left margin for UL to indent in HTML an...
Set list style position outside in HTML and...
Set list style position to inside in HTML a...
Set list-style to circle in HTML and CSS
Set list style to disc inside in HTML and C...
Set list style to disc outside in HTML and ...
Set list style to inside in HTML and CSS
Set list style type decimal in HTML and CSS
Set list style with image in HTML and CSSSet only a marker image in HTML and CSS
Set only the position for list style in HTM...
Set text in list to indent -0.75em in HTML ...
Set ul list style to circle outside and no ...
Use LI element to create horizontal menu in...