list-style-typeThe list-style-type CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element. Show The color of the marker will be the same as the computed color of the element it applies to. Only a few elements (<li> and <summary>) have a default value of display: list-item. However, the list-style-type property may be applied to any element whose display value is set to list-item. Moreover, because this property is inherited, it can be set on a parent element (commonly <ol> or <ul>) to make it apply to all list items. list-styleThe list-style CSS shorthand property allows you to set all the list style properties at once. Note: This property is applied to list items, i.e., elements with display: list-item; . By default this includes <li> elements. Because this property is inherited, it can be set on a parent element (normally <ol> or <ul>) to make the same list styling apply to all the items inside. CSS list-style-type Property
❮
Reference
❯
ExampleSet some different list styles:
ul.a {list-style-type: circle;}
Try it Yourself »
More "Try it Yourself" examples below. CSS Lists
❮ Previous
Next ❯
CSS: list-style-type propertyThis CSS tutorial explains how to use the CSS property called list-style-type with syntax and examples. CSS | list-style-type PropertyThe list-style-type property in CSS specifies the appearance of the list item marker (such as a disc, character, or custom counter style) if ‘list-style-image’ has the value ‘none’. Syntax: list-style-type: disc|circle|square|decimal|lower-roman|upper-roman| lower-greek|lower-latin|upper-latin|lower-alpha|upper-alpha|none| inherit;Property values:
Note: lower-alpha and upper-alpha are same as lower-latin and upper-latin respectively.
Article Tags :
CSS HTML Web Technologies
CSS-Properties Practice Tags :
HTML CSS list-style-typeRun Stack editor Unstack editor Editor Preview The CSS list-style-type property is used for specifying the "list style type" (how list item markers should be styled). You can specify the list style type as one of the predefined counter styles (e.g., a disc, square, roman numerals, etc) or you can use your own customized counter style. You can create your own custom counter style with the @counter-style at-rule, then refer to that style in list-style-type by simply adding that counter style's name as the value for list-style-type. You can also provide a string as the value (the string becomes the marker) or use the symbols() function as a quick way to add a custom marker style. Also see the list-style, list-style-position and list-style-image properties. |