{{DomRef()}}
The HTMLLIElement
interface expose specific properties and methods (beyond those defined by regular {{domxref("HTMLElement")}} interface it also has available to it by inheritance) for manipulating list elements.
Properties
Inherits properties from its parent, {{domxref("HTMLElement")}}.
Name | Type | Description |
---|---|---|
type {{obsolete_inline}} |
{{domxref("DOMString")}} | The type of the bullets, "disc" , "square" or "circle" . As the standard way of defining the list type is via the CSS {{cssxref("list-style-type")}} property, use the CSSOM methods to set it via a script. |
value |
long |
Indicates the ordinal position of the list element inside a given {{HTMLElement("ol")}}. It reflects the {{htmlattrxref("value", "li")}} attribute of the HTML {{HTMLElement("li")}} element, and can be smaller than 0 . If the {{HTMLElement("li")}} element is not a child of an {{HTMLElement("ol")}} element, the property has no meaning. |
Methods
No specific method; inherits properties from its parent, {{domxref("HTMLElement")}}.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', "grouping-content.html#the-li-element", "HTMLLIElement")}} | {{Spec2('HTML WHATWG')}} | No change from {{SpecName("HTML5 W3C")}}. |
{{SpecName('HTML5 W3C', "grouping-content.html#the-li-element", "HTMLLIElement")}} | {{Spec2('HTML5 W3C')}} | The following properties is now obsolete: type . |
{{SpecName('DOM2 HTML', 'html.html#ID-74680021', 'HTMLLIElement')}} | {{Spec2('DOM2 HTML')}} | No change from {{SpecName("DOM1")}}. |
{{SpecName('DOM1', 'level-one-html.html#ID-74680021', 'HTMLLIElement')}} | {{Spec2('DOM1')}} | Initial definition. |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoDesktop(1.0)}} [1] | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoMobile(1.0)}} [1] | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
[1] Prior to Firefox 10, Gecko incorrectly reflected negative {{htmlattrxref("value", "li")}} attributes to 0
.
See also
- The HTML element implementing this interface: {{HTMLElement("li")}}