HTML/CSS/CSS Attributes and Javascript Style Properties/list style type
Содержание
- 1 list-style-type: armenian
- 2 list-style-type: circle
- 3 list-style-type: decimal
- 4 list-style-type: decimal-leading-zero
- 5 list-style-type: disc
- 6 "list-style-type" Example
- 7 list-style-type: georgian
- 8 list-style-type: lower-greek
- 9 list-style-type: lower-latin
- 10 list-style-type: lower-roman
- 11 list-style-type: square
- 12 list-style-type: upper-greek
- 13 list-style-type: upper-latin
- 14 The list-style-type Property
- 15 The table that follows lists the popularly supported values for ordered lists.
list-style-type: armenian
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title></title> <style type="text/css"> ol { font-family: sans-serif; list-style-type: armenian; } </style> </head> <body>
- first list item.
- second list item.
- third list item.
- fourth list item.
- fifth list item.
</body>
</html>
</source>
list-style-type: circle
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title></title> <style type="text/css"> ul { font-family: sans-serif; } li.circle { list-style-type: circle; } </style> </head> <body>
- This list item has a circle marker.
- This list item has a circle marker.
</body>
</html>
</source>
list-style-type: decimal
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title></title> <style type="text/css"> ol { font-family: sans-serif; } ol#decimal li { list-style-type: decimal; } </style> </head> <body>
- This is the first list item.
- This is the second list item.
- This is the third list item.
</body>
</html>
</source>
list-style-type: decimal-leading-zero
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title></title> <style type="text/css"> ol { font-family: sans-serif; } ol#decimal-leading-zero li { list-style-type: decimal-leading-zero; } </style> </head> <body>
- This is the first list item.
- This is the second list item.
- This is the third list item.
</body>
</html>
</source>
list-style-type: disc
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title></title> <style type="text/css"> ul { font-family: sans-serif; } li.disc { list-style-type: disc; } </style> </head> <body>
- This list item has a disc marker.
- This list item has a disc marker.
</body>
</html>
</source>
"list-style-type" Example
<source lang="html4strict">
<html> <body>
- Item 1.
- Item 2.
- Item 3.
- Item 4.
- Item 5.
<input type="button" value="Set listStyleType to "circle"" onclick="myL.style.listStyleType="circle"">
<input type="button" value="Set listStyleType to "square"" onclick="myL.style.listStyleType="square"">
<input type="button" value="Set listStyleType to "disc"" onclick="myL.style.listStyleType="disc"">
<input type="button" value="Set listStyleType to "lower-alpha"" onclick="myL.style.listStyleType="lower-alpha"">
<input type="button" value="Set listStyleType to "lower-roman"" onclick="myL.style.listStyle="lower-roman"">
</body> </html>
</source>
list-style-type: georgian
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title></title> <style type="text/css"> ol { font-family: sans-serif; list-style-type: georgian; } </style> </head> <body>
- first list item.
- second list item.
- third list item.
- fourth list item.
- fifth list item.
</body>
</html>
</source>
list-style-type: lower-greek
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title></title> <style type="text/css"> ol { font-family: sans-serif; list-style-type: lower-greek; } </style> </head> <body>
- first list item.
- second list item.
- third list item.
- fourth list item.
- fifth list item.
</body>
</html>
</source>
list-style-type: lower-latin
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title></title> <style type="text/css"> ol { font-family: sans-serif; list-style-type: lower-latin; } </style> </head> <body>
- This is the first list item.
- This is the second list item.
- This is the third list item.
- This is the fourth list item.
- This is the fifth list item.
</body>
</html>
</source>
list-style-type: lower-roman
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title></title> <style type="text/css"> ol { font-family: sans-serif; list-style-type: lower-roman; } </style> </head> <body>
- first list item.
- second list item.
- third list item.
- fourth list item.
- fifth list item.
</body>
</html>
</source>
list-style-type: square
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title></title> <style type="text/css"> ul { font-family: sans-serif; } li.square { list-style-type: square; } </style> </head> <body>
- This list item has a square marker.
- This list item has a square marker.
</body>
</html>
</source>
list-style-type: upper-greek
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title></title> <style type="text/css"> ol { font-family: sans-serif; list-style-type: upper-greek; } </style> </head> <body>
- first list item.
- second list item.
- third list item.
- fourth list item.
- fifth list item.
</body>
</html>
</source>
list-style-type: upper-latin
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title></title> <style type="text/css"> ol { font-family: sans-serif; } ol#upper-latin li { list-style-type: upper-latin; } </style> </head> <body>
- This is the first list item.
- This is the second list item.
- This is the third list item.
</body>
</html>
</source>
The list-style-type Property
<source lang="html4strict">
Value Marker none None disc (default) A filled-in circle circle An empty circle square A filled-in square
</source>
The table that follows lists the popularly supported values for ordered lists.
<source lang="html4strict">
Value Meaning Example decimal Number 1, 2, 3, 4, 5 decimal-leading-zero 0 before the number 01, 02, 03, 04, 05 lower-alpha Lowercase alphanumeric a, b, c, d, e
characters
upper-alpha Uppercase alphanumeric A, B, C, D, E
characters
lower-roman Lowercase Roman numerals i, ii, iii, iv, v upper-roman Uppercase Roman numerals I, II, III, IV, V
</source>