{{DomRef()}}
The HTMLOListElement
interface provides special properties (beyond those defined on the regular {{domxref("HTMLElement")}} interface it also has available to it by inheritance) for manipulating ordered list elements.
Properties
Inherits properties from its parent, {{domxref("HTMLElement")}}.
-
reversed
-
Is a {{domxref("Boolean")}} value reflecting the {{htmlattrxref("reversed", "ol")}} and defining if the numbering is descending, that is its value is
true
, or ascending (false
). -
start
-
Is a
long
value reflecting the {{htmlattrxref("start", "ol")}} and defining the value of the first number of the first element of the list. -
type
-
Is a {{domxref("DOMString")}} value reflecting the {{htmlattrxref("type", "ol")}} and defining the kind of marker to be used to display. It can have the following values:
'1'
meaning that decimal numbers are used:1
,2
,3
,4
,5
, …'a'
meaning that the lowercase latin alphabet is used:a
,b
,c
,d
,e
, …'A'
meaning that the uppercase latin alphabet is used:A
,B
,C
,D
,E
, …'i'
meaning that the lowercase latin numerals are used:i
,ii
,iii
,iv
,v
, …'I'
meaning that the uppercase latin numerals are used:I
,II
,III
,IV
,V
, …
-
compact
{{obsolete_inline}} - Is a {{domxref("Boolean")}} indicating that spacing between list items should be reduced. This property reflects the {{htmlattrxref("compact", "ol")}} attribute only, it doesn't consider the {{cssxref("line-height")}} CSS property used for that behavior in modern pages.
Methods
No specific method; inherits methods from its parent, {{domxref("HTMLElement")}}.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', "grouping-content.html#the-ol-element", "HTMLOListElement")}} | {{Spec2('HTML WHATWG')}} | No change from {{SpecName("HTML5 W3C")}}. |
{{SpecName('HTML5 W3C', "grouping-content.html#the-ol-element", "HTMLOListElement")}} | {{Spec2('HTML5 W3C')}} | Added the reversed property. |
{{SpecName('DOM2 HTML', 'html.html#ID-ID-58056027', 'HTMLOListElement')}} | {{Spec2('DOM2 HTML')}} | No change from {{SpecName("DOM1")}}. |
{{SpecName('DOM1', 'level-one-html.html#ID-58056027', 'HTMLOListElement')}} | {{Spec2('DOM1')}} | Initial definition. |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoDesktop(1.0)}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
reversed |
18 | {{CompatGeckoDesktop(18.0)}} | {{CompatNo}} | {{CompatNo}} | 5.2 |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoMobile(1.0)}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
reversed |
{{CompatVersionUnknown}} | {{CompatGeckoMobile(18.0)}} | {{CompatNo}} | {{CompatNo}} | {{CompatVersionUnknown}} |
See also
- The HTML element implementing this interface: {{ HTMLElement("ol") }}.