listStyleType property
Sets or retrieves the predefined type of the line-item marker for the object.
![]() ![]() |
Syntax
Integer value = object.put_listStyleType( v);Integer value = object.get_listStyleType(* sType);
Property values
Type: BSTR
-
Default. Solid circles.
-
Outlined circles.
-
Solid squares.
-
1, 2, 3, 4, and so on.
-
01, 02, 03, 04, and so on.
-
A, b, c, d, and so on.
-
A, B, C, D, and so on.
-
I, ii, iii, iv, and so on.
-
I, II, III, IV, and so on.
-
Lowercase classical Greek: alpha, beta, gamma, and so on.
-
A, b, c, d, and so on.
-
A, B, C, D, and so on.
-
Traditional Armenian numbering.
-
Traditional Georgian numbering: an, ban, gan, don, and so on.
-
No marker is shown.
String format
disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none
CSS information
| Applies To | All elements |
|---|---|
| Media | visual |
| Inherited | 1 |
| Initial Value | disc |
Standards information
- CSS 2.1, Section 5.6.3
Remarks
The IHTMLCurrentStyle::listStyleType property determines the appearance of the list-item marker if the value of the IHTMLCurrentStyle::listStyleImage property is set to none, or if the image pointed to by the URL cannot be displayed.
The IHTMLCurrentStyle::listStyleType property can be applied to any element when IHTMLCurrentStyle::margin and IHTMLCurrentStyle::display:list-item are applied. The IHTMLCurrentStyle::display:list-item property is available starting with Microsoft Internet Explorer 6.
If the left margin of a line item is set to 0 using one of the IHTMLCurrentStyle::margin properties, the list-item markers do not show. The margin should be set to a minimum of 30 points.
Below you can see the different values for IHTMLCurrentStyle::listStyleType.

Examples
The following examples use the IHTMLCurrentStyle::listStyleType attribute and the IHTMLCurrentStyle::listStyleType property to set the markers.
This example uses ul as a selector in an embedded (global) style sheet to change the marker type to circle.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/list-style-type.htm
<style> ul { list-style-type:circle } </style>
This example uses inline scripting to change the marker type on when an HTMLFrameSiteEvents::onmouseover event occurs.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/listStyleType.htm
<ul onmouseover="this.style.listStyleType='circle'">
This example demonstrates the newer line-item markers added for Internet Explorer 8.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/list-style-type_ie8.htm
<style type="text/css"> .decleadzero { list-style-type: decimal-leading-zero; } ... </style> <body> <ol class="decleadzero"> <li>This is the first item. </li> <li>This is the second item. </li> <li>This is the third item. </li> </ol> ... </body>
Requirements
|
Minimum supported client |
Windows XP |
|---|---|
|
Minimum supported server |
Windows Server 2003 |
|
Header |
|
|
IDL |
|
|
DLL |
|

