Latest web development tutorials

HTML DOM Style listStyleType property

Style Object Reference Style Objects

Definition and Usage

listStyleType property sets or returns the type of list item marker.

grammar

Setting listStyleType properties:

Object.style.listStyleType="value"

Back listStyleType properties:

Object.style.listStyleType

描述
armenian 该标记是传统的亚美尼亚编号。
circle 该标记是空心圆。
cjk-ideographic 该标记是简单的表意数字。
decimal 该标记是数字。这是 <ol> 的默认值。
decimal-leading-zero 该标记是一个带有前导零的数字(01、02、03 等)
disc 该标记是实心圆。这是 <ul> 的默认值。
georgian 该标记是传统的乔治亚编号。
hebrew 该标记是传统的希伯来编号。
hiragana 该标记是传统的平假名编号(a、i、u、e、o、ka、ki 等)。
hiragana-iroha 该标记是传统的平假名 iroha 编号(i、ro、ha、ni、ho、he、to 等)。
inherit listStyleType 属性的值从父元素继承。
katakana 该标记是传统的片假名编号(A、I、U、E、O、KA、KI 等)。
katakana-iroha 该标记是传统的片假名 iroha 编号(I、RO、HA、NI、HO、HE、TO 等)。
lower-alpha 该标记是小写英文字母(a、b、c、d、e 等)。
lower-greek 该标记是小写希腊字母(alpha、beta、gamma 等)。
lower-latin 该标记是小写拉丁字母(a、b、c、d、e 等)。
lower-roman 该字母是小写罗马数字(i、ii、iii、iv、v 等)。
none 没有显示任何标记。
square 该标记是实心方块。
upper-alpha 该标记是大写英文字母(A、B、C、D、E 等)。
upper-latin 该标记是大写拉丁字母(A、B、C、D、E 等)。
upper-roman 该标记是大写罗马数字(I、II、III、IV、V 等)。


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support listStyleType property.

Note: IE9 and Opera 11 does not support the attribute values: cjk-ideographic, hebrew, hiragana , hiragana-iroha, katakana and katakana-iroha.

Note: IE8 If you specify a DOCTYPE, only supports attribute values:! Decimal-leading-zero, lower-greek, lower-latin, upper-latin, armenian, georgian and inherit.


Examples

Examples

Change the list item marker type:

<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function displayResult () {
document.getElementById ( "ul1") style.listStyleType = "square".;
}
</ Script>
</ Head>
<Body>

<Ul id = "ul1">
<Li> Coffee </ li>
<Li> Tea </ li>
<Li> Water </ li>
<Li> Soda </ li>
</ Ul>
<br>
<Button type = "button" onclick = "displayResult ()"> tag types to modify the list item </ button>

</ Body>
</ Html>

try it"


Examples

More examples

A list of all the different types of styles
See a list of all the different types of styles.


Style Object Reference Style Objects