In HTML, you can use the list-style-type attribute to customize the ordered list. You only need to set the "list-style-type: type" style to the ol element. The list-style-type attribute sets the type of list item markup.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
list-style-type attribute sets the type of list item tag.
Syntax:
元素{ list-style-type:类型; }
Attribute value:
<html> <head> <style type="text/css"> ul.circle { list-style-type: circle; } ul.square { list-style-type: square; } ol.upper-roman { list-style-type: upper-roman; } ol.lower-alpha { list-style-type: lower-alpha; } </style> </head> <body> <p>Type circle:</p> <ul class="circle"> <li>Coffee</li> <li>Tea</li> <li>Coca Cola</li> </ul> <p>Type square:</p> <ul class="square"> <li>Coffee</li> <li>Tea</li> <li>Coca Cola</li> </ul> <p>Type upper-roman:</p> <ol class="upper-roman"> <li>Coffee</li> <li>Tea</li> <li>Coca Cola</li> </ol> <p>Type lower-alpha:</p> <ol class="lower-alpha"> <li>Coffee</li> <li>Tea</li> <li>Coca Cola</li> </ol> </body> </html>
The above is the detailed content of How to customize html ordered list. For more information, please follow other related articles on the PHP Chinese website!