CSS - list-style-image


Description:

The list-style-image property defines a pointer to an image resource that is to be used as the marker for list items.

Possible Values:

  • uri : A pointer to an image resource. If the URL cannot be resolved, then the property is treated as if the value were none.
  • none: No image should be used as a marker for the element.

Applies to:

All the elements with a display of list-item.

DOM Syntax:

object.style.listStyleImage="images/bullet.gif"

Example:

Here is the example:

<ul>
<li style="list-style-image: url(images/bullet.gif);">Maths</li>
<li>Social Science</li>
<li>Physics</li>
</ul>
<ol>
<li style="list-style-image: url(images/bullet.gif);">Maths</li>
<li>Social Science</li>
<li>Physics</li>
</ol>
     

This will produce following result:

  • Maths
  • Social Science
  • Physics
  1. Maths
  2. Social Science
  3. Physics

 

 





Spacer Bottom Left Corner ImageBottom Right Corner Image
Valid XHTML 1.0 Strict  Valid CSS! Check the accessibility of this site according to U.S. Section 508