X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Style listStylePosition Property

Style Object Reference Style Object

Example

Indent the list-item marker:

document.getElementById("myUL").style.listStylePosition="inside";

Try it yourself »


Definition and Usage

The listStylePosition property sets or returns the position of the list-item marker.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The listStylePosition property is supported in all major browsers.


Syntax

Return the listStylePosition property:

object.style.listStylePosition

Set the listStylePosition property:

object.style.listStylePosition="outside|inside|initial|inherit"

Property Values

Value Description
outside The list-item marker will be rendered before any text content. This is default
inside Indents the list-item marker marker
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Technical Details

Default Value: outside 
Return Value: A String, representing the position of the list-item marker
CSS Version CSS1


More Examples

Example

Return the position of the list-item marker:

alert(document.getElementById("myList").style.listStylePosition);

Try it yourself »


Related Pages

CSS tutorial: CSS List

CSS reference: list-style-position property

HTML DOM reference: listStyle property


Style Object Reference Style Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook