Why do you use oil

oil

Overview

The HTML element ordered list

    is used to define an ordered list. The list can be in a variety of forms, including letters, Roman numerals, and regular numbers. The individual entries within the list are inserted into the element via lists (
  1. ) elements.

Attributes

HTML5
Defines a start value for the enumeration of the list entries. This happens regardless of the type of numbering. However, Roman numerals and letters cannot be given as a value; the only accepted value is a number. To start the list with the letter "C", just write:.

The start attribute was marked as deprecated in HTML4, but reintegrated in HTML5.

HTML5

Used to set the bullet in the list. The values ​​are specified in the HTML3.2 specification and are listed in the "transitional" version of HTML 4.0 / 4.01,, and. The browser can decide on different characters, depending on the degree of nesting, if the type attribute is not used. The WebTV interface also supports a character. This attribute is deprecated, the CSSlist-style-type property should be used instead.

The Type attribute was marked as deprecated in HTML4, but reintegrated in HTML5.

Indicates that the list should be rendered in a compact form. The interpretation of this attribute depends on the browser.

The compact attribute has been marked as deprecated since HTML4 and should no longer be used.

a similar effect can be achieved with the CSS property (en-US) and a value of.

Examples

Simple example

<ol> <li>Erster Eintrag</li> <li>Zweiter Eintrag</li> <li>Dritter Eintrag</li> </ol>

This HTML outputs the following:

  1. First entry
  2. Second entry
  3. Third entry

Use of the attribute

<ol start="7"> <li>Erster Eintrag</li> <li>Zweiter Eintrag</li> <li>Dritter Eintrag</li> </ol>

This HTML outputs the following:

  1. First entry
  2. Second entry
  3. Third entry

Nested lists

<ol> <li>Erster Eintraf</li> <li>Zweiter Eintrag <!-- Achtung, das schließende </li> Tag wird hier nicht notiert! --> <ol> <li>Zweiter Eintrag erster Untereintrag</li> <li>Zweiter Eintrag zweiter Untereintrag</li> <li>Zweiter Eintrag dritter Untereintrag</li> </ol> </li> <!-- Hier ist das schließende </li> Tag angegeben! --> <li>Dritter Eintrag</li> </ol>

This HTML outputs the following:

  1. First entry
  2. Second entry
    1. Second entry, first subentry
    2. Second entry, second subentry
    3. Second entry, third subentry
  3. Third entry

Nested
    and

    <ol> <li>Erster Eintrag</li> <li>Zweiter Eintrag <!-- Achtung, das schließende </li> Tag wird hier nicht notiert! --> <ul> <li>Zweiter Eintrag erster Untereintrag</li> <li>Zweiter Eintrag zweiter Untereintrag</li> <li>Zweiter Eintrag dritter Untereintrag</li> </ul> </li> <!-- Hier ist das schließende </li> Tag angegeben! --> <li>Dritter Eintrag</li> </ol>

    This HTML outputs the following:

    1. First entry
    2. Second entry
      • Second entry, first subentry
      • Second entry, second subentry
      • Second entry, third subentry
    3. Third entry

    Hints

    As many lists as you want can be nested, in any order.

    To change the indentation of lists, the CSSmargin property should be used.

    See also