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 attributetypecan specify the bullet type (disc,circleorsquare) for a particular list item.Within ordered lists (
ol),typecontrols 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 theolelement, not toli.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>
|
Copyright © 2010 O’Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from "HTML & XHTML ─ kurz & gut" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de