The Style listStyleType property is used for setting or returning the list-item marker type.
It has default values as “disc” for <ul> and “decimal” for <ol> and returns a string which represents the type of the list.
- To get the property:
- To set the property:
object.style.listStyleType = value"
- armenian: It is used to represent the marker in traditional Armenian numbering.
- circle: It is used to represent the marker in a circle.
- decimal: It is used to represent the marker in decimal format.
- lower-alpha: It is used to represent the marker in lower-alpha (a, b, c, d, e, etc).
- lower-roman: It is used to represent the marker in lower-roman (i, ii, iii, iv, v, etc).
Below program illustrates the Style listStyleType property method :
Example: Changing the list-item marker type to “lower-alpha”.
- Before Clicking the button:
- After clicking the button
Supported Browsers: The browser supported by HTML | DOM Style listStyleType Property
are listed below:
- Google Chrome
- Internet Explorer
- Apple Safari
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.