--- title:
{{HTMLRef}}
The HTML <li>
elementi, liste nesnesİ için kullanılır. Bir alt element içermelidir: bir sıralı liste ({{HTMLElement("ol")}}), bir sırasız liste ({{HTMLElement("ul")}}) veya bir menü ({{HTMLElement("menu")}}). Menülerde ve sırasız listelerde, listenen ögeler bir In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.
Content categories | None. |
---|---|
Permitted content | Flow content. |
Tag omission | The end tag can be omitted if the list item is immediately followed by another {{HTMLElement("li")}} element, or if there is no more content in its parent element. |
Permitted parent elements | An {{HTMLElement("ul")}}, {{HTMLElement("ol")}}, or {{HTMLElement("menu")}} element. Though not a conforming usage, the obsolete {{HTMLElement("dir")}} can also be a parent. |
DOM interface | {{domxref("HTMLLIElement")}} |
Element type | Block |
This element includes the global attributes.
Note: Prior to {{Gecko("9.0")}}, negative values were incorrectly converted to 0. Starting in {{Gecko("9.0")}} all integer values are correctly parsed.
a
: lowercase lettersA
: uppercase lettersi
: lowercase Roman numeralsI
: uppercase Roman numerals1
: numbers<ol> <li>first item</li> <li>second item</li> <li>third item</li> </ol>
The above HTML will output:
<ol type="I"> <li value="3">third item</li> <li>fourth item</li> <li>fifth item</li> </ol>
The above HTML will output:
<ul> <li>first item</li> <li>second item</li> <li>third item</li> </ul>
For more detailed examples, see the <ol> and <ul> pages.
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', 'grouping-content.html#the-li-element', '<li>')}} | {{Spec2('HTML WHATWG')}} | |
{{SpecName('HTML5 W3C', 'grouping-content.html#the-li-element', '<li>')}} | {{Spec2('HTML5 W3C')}} | |
{{SpecName('HTML4.01', 'lists.html#h-10.2', '<li>')}} | {{Spec2('HTML4.01')}} | The type attribute has been deprecated. |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoDesktop("1.0")}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoMobile("1.0")}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
<li>
element: