Little Web Hut

CSS 2.1 Reference: list-style-position Property

CSS list-style-position Property
Syntax
selector {list-style-position: value;}
  • value is specified by using one of the following keywords: inside, outside, or inherit.
Usage

The list-style-position property is used to specify the location of the list item marker. The list item marker can be located inside or outside of the element's box.

This property is specified by using a keyword according to the syntax shown above.


CSS Example: The list-style-position properties are set to inside and outside.
  .in {list-style-position: inside;}
  .out {list-style-position: outside;}
Test It HTML StyleTest It XHTML StyleTest It HTML5 Style

Keywords
  • inside - The list item marker is located inside the element's box.
  • outside - The list item marker is located outside the element's box.
  • inherit - The inherit keyword is used to specify that the value for this property should be taken from the parent element. If inherit is used with the root element, then the initial value for this property will be used.
Applies To Elements that have a display property value of list-item. This is typically the default value for the HTML <li> element.
Inherited Yes
Initial Value outside


list-style-position Property Examples
Test It HTML StyleTest It HTML StyleTest It HTML5 StyleThe list-style-position properties are set to inside and outside.