From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/html/element%2Fli.html | 152 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 devdocs/html/element%2Fli.html (limited to 'devdocs/html/element%2Fli.html') diff --git a/devdocs/html/element%2Fli.html b/devdocs/html/element%2Fli.html new file mode 100644 index 00000000..818a8a6a --- /dev/null +++ b/devdocs/html/element%2Fli.html @@ -0,0 +1,152 @@ +

<li>: The List Item element

The <li> HTML element is used to represent an item in a list. It must be contained in a parent element: an ordered list (<ol>), an unordered list (<ul>), or a menu (<menu>). 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.

+

Try it

+
+

Attributes

+
+

This element includes the global attributes.

value

This integer attribute indicates the current ordinal value of the list item as defined by the <ol> element. The only allowed value for this attribute is a number, even if the list is displayed with Roman numerals or letters. List items that follow this one continue numbering from the value set. The value attribute has no meaning for unordered lists (<ul>) or for menus (<menu>).

+type Deprecated Non-standard +

This character attribute indicates the numbering type:

  • +a: lowercase letters
  • +A: uppercase letters
  • +i: lowercase Roman numerals
  • +I: uppercase Roman numerals
  • +1: numbers

This type overrides the one used by its parent <ol> element, if any.

Note: This attribute has been deprecated; use the CSS list-style-type property instead.

+
+

Examples

+

For more detailed examples, see the <ol> and <ul> pages.

+

Ordered list

+
+
+

html

+
<ol>
+  <li>first item</li>
+  <li>second item</li>
+  <li>third item</li>
+</ol>
+
+

Result

+
+ + +
+
+

Ordered list with a custom value

+
+
+

html

+
<ol type="I">
+  <li value="3">third item</li>
+  <li>fourth item</li>
+  <li>fifth item</li>
+</ol>
+
+

Result

+
+ + +
+
+

Unordered list

+
+
+

html

+
<ul>
+  <li>first item</li>
+  <li>second item</li>
+  <li>third item</li>
+</ul>
+
+

Result

+
+ + +
+
+

Technical summary

+
Content categories None.
Permitted content +Flow content.
Tag omission The end tag can be omitted if the list item is immediately followed by another <li> element, or if there is no more content in its parent element.
Permitted parents An <ul>, <ol>, or <menu> element. Though not a conforming usage, the obsolete <dir> can also be a parent.
Implicit ARIA role listitem when child of an ol, ul or menu
Permitted ARIA roles menuitem, menuitemcheckbox, menuitemradio, option, none, presentation, radio, separator, tab, treeitem
DOM interface HTMLLIElement
+

Specifications

+
+ + +
Specification
HTML Standard
# the-li-element
+

Browser compatibility

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariWebView AndroidChrome AndroidFirefox for AndroidOpera AndroidSafari on IOSSamsung Internet
li11215.5≤12.134.4184≤12.111.0
type1121≤6≤12.1≤44.4184≤12.1≤3.21.0
value1121≤6≤12.1≤44.4184≤12.1≤3.21.0
+

See also

+
+

+ © 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
+ https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li +

+
-- cgit v1.2.3