asp.net.ph

Skip Navigation Links

list-style-type Attribute | listStyleType Property

CSS Attributes Index   Classification Attributes


Sets or retrieves the predefined type of the line-item marker for the object.

Syntax


CSS { list-style-type: 'disc' | 'circle' | 'square' | 'decimal' | 'lower-roman' | 'upper-roman' | 'lower-alpha' | 'upper-alpha' | 'none' }
Script object.style.listStyleType = sType ]

Possible Values


disc Solid circles.
circle Outlined circles.
square Solid squares.
decimal 1, 2, 3, 4, and so on.
lower-roman i, ii, iii, iv, and so on.
upper-roman I, II, III, IV, and so on.
lower-alpha a, b, c, d, and so on.
upper-alpha A, B, C, D, and so on.
none No marker is shown.

The property is read/write with a default value of disc; the CSS attribute is inherited.

Remarks

The property determines the appearance of the list-item marker if list-style-image is none or if the image pointed to by the URL cannot be displayed.

If the left margin of a line item is set to 0 using one of the margin properties, the list-item markers will not show. The margin should be set to a minimum of 30 points.

Example

The following example demonstrates the effects of applying the different values possible for the CSS list-style-type attribute. This feature requires Microsoft® Internet Explorer® 4.0 or later.

 Show me 

The sample below uses inline event handlers to dynamically change an object’s listStyleType in response to mouse events.

<ul onmouseover="this.style.listStyleType='circle'"
   onclick="this.style.listStyleType='decimal'"
   ondblclick="this.style.listStyleType='lower-alpha'"
   onmouseout="this.style.listStyleType='disc'">
   ...
</ul>

This feature requires Microsoft® Internet Explorer® 4.0 or later.

 Show me 

Applies To

currentStyle, LI, OL, runtimeStyle, style, UL

See Also

list-style, list-style-image, list-style-position



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note