listStylePosition Property - Javascript CSS Style Property

Javascript examples for CSS Style Property:listStylePosition


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

Property Values

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

Technical Details

Item Value
Default Value: outside?
Return Value: A String, representing the position of the list-item marker
CSS VersionCSS1

Get the list-item marker:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

<ul id="myList" style="list-style-position:inside;">
</ul>/*www  .ja  v a  2  s . c  o  m*/

<button type="button" onclick="myFunction()">Return list-item marker position</button>

function myFunction() {


Related Tutorials