XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / li

(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

   

li

HTML 4.01 | HTML 5

<li> ... </li>

Marks a list item within the elements ol, ul, menu and dir. In HTML 4.01, the elements menu and dir are deprecated. In HTML 5, menu was redefined, while dir was removed entirely.

Start/end tag

HTML: required/optional; XHTML: required/required

Attributes

Core, internationalization, events, global HTML 5 attributes

  • type="Format"

    Deprecated. Not in HTML 5. Changes the format of automatically generated numbers and list bullets.

    In unordered lists (ul), the attribute type can specify the bullet type (disc, circle or square) for a particular list item.

    Within ordered lists (ol), type controls the numbering style of a particular list item.

    Stylesheets provide easier and more detailed control over the appearance of list bullets.

  • start="Zahl"

    Not standards-compliant. In ordered lists (ol), you can specify the initial value for numbering list items. According to the (X)HTML recommendations, the attribute applies only to the ol element, not to li.

  • value="Zahl"

    Deprecated in HTML 4.01. Part of HTML 5. Specifies the number of an item in an ordered list. Subsequent entries receive correspondingly higher numbers.

Example

<ol>
  <li>Ofen auf 150 Grad vorheizen.</li>
  <li>Knoblauch in Alufolie wickeln.</li>
  <li>Für 2 Stunden backen.</li>
</ol>

 

> back to the alphabetical list of elements

   

 

 

 

back to top