HTML DOM LiObject


Li Object

The Li object represents an HTML <li> element.

Access a Li Object

You can use getElementById() to access a <li> element:

var x = document.getElementById("myLi"); Try it

Create a Li Object

You can use the document.createElement() method to create a <li> element:

var x = document.createElement("LI"); Try it

Li Object Properties

Property Description
value Sets or returns the value of the value attribute of a list item.

Standard Properties and Events

The Li object also supports standardPropertiesandEvents。


Related Articles

HTML Reference Manual:HTML <li> Tag

Other Extensions