English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML-Referenzhandbuch

HTML-Tag-Liste

HTML: <ol> Tag

HTML <ol>-Tag definiert eine geordnete Liste im HTML-Dokument. Dieses Tag wird oft auch als <ol>-Element bezeichnet.

Online-Beispiel

2 Beispiel für verschiedene geordnete Listen:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Verwendung des HTML-ol-Tags (Grundtutorials-Netz oldtoolbag.com)</title>
</head>
<body>
<ol>
  <li>Erstes Element</li>
  <li>Das zweite Element</li>
  <li>Das dritte Element</li>
  <li>Viertes Element</li>
</ol>
<ol start="10">
  <li>Erstes Element10</li>
  <li>Zweites Element11</li>
  <li>Drittes Element12</li>
  <li>Viertes Element13</li>
</ol>
</body>
</html>
Testen Sie und sehen Sie ›/›

Browserkompatibilität

IEFirefoxOperaChromeSafari

Derzeit unterstützen die meisten Browser den <ol>-Tag.

Tagdefinition und Verwendungshinweise

Der <ol>-Tag definiert eine geordnete Liste. Die Liste wird numerisch sortiert angezeigt.

Der <ol>-Tag besteht aus<li>Tag besteht aus.

Verwenden Sie <ol>-Markierungen, wenn die Liste eine sinnvolle numerische Reihenfolge hat.

Sie können <ol>, <ul> und <menu>-Listen einklemmen.

Hinweise und注意事项

Hinweis: Verwenden Sie <ul>, um eine unsortierte Liste zu erstellen, falls erforderlich. <ul> Tag.

Hinweis:CSS wird verwendet, um die Listenstile zu definieren.

HTML 4.01 von HTML5unterschieden

in HTML 4.01 Das "start"- und "type"-Attribut sind veraltet und werden in HTML5Does not support this attribute.

The "reversed" attribute is not supported in HTML5 .

in the new attribute in HTML 4.01The "compact" attribute has been deprecated in HTML5Does not support this attribute.

Attribute

AttributeValueDescription
compactcompactHTML5Not supported in the middle, not recommended. Use styles instead. Specifies that the list is presented in a more compact style than the normal case.
reversedHTML5reversedSpecify the reversed list (9,8,7...)
startnumberHTML5Not supported, not recommended. Use styles instead. Specifies the starting point in the list.
type1
A
a
I
i

Specifies the type of the list. Not recommended. Use styles instead.
Character value, indicating the numbering style of the list. It can be any of the following values:
a-represents lowercase
A-represents uppercase
i-represents lowercase Roman numerals
I-represents uppercase Roman numerals
1-represents numbers

Global Attributes

<ol> Tag supports global attributes, see the complete attribute table HTML Global Attributes.

event attributes

<ol> Tag supports all HTML Event Attributes.

Related Articles

HTML Tutorial:HTML List