Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Li Object

HTML DOM Li Object


Li Object

The Li object represents an HTML

  • .

    Accessing the Li Object

    You can use getElementById() to access it

  • element:

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

    Try it

    Creating the Li Object

    You can use the document.createElement() method to create

  • 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 the standard property and Events.


    Related Articles

    HTML Reference Manual:HTML

  • tag