Copyright © tutorialspoint.com
The list-style property is a shorthand property used to set the position and type of markers in a list; it can also be used to assign an image as the marker.
All the elements with a display of list-item.
object.style.listStyle="decimal;" |
Here is the example:
<ul style="list-style-type:circle;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ul> <ul style="list-style-type:square;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ul> <ol style="list-style-type:decimal;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ol> <ol style="list-style-type:lower-alpha;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ol> <ol style="list-style-type:lower-roman;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ol> |
This will produce following result:
|
To Become more comfortable - Do Online Practice
Copyright © tutorialspoint.com