html list ordered list

1.2 Ordered list

(1) Grammar

```

<ol>

<li>Going out</li>

<li>Turn right</li>

...

</ul>

```

(2) Semantics

Unordered lists are used to group a set of data or content where the order makes sense

(3) Default style (demo)

- default spacing

- List style: numbered

(4) Typical application (illustration)

- Steps in cooking recipes

- Turn-by-turn directions when giving directions

- List of ingredients sorted by content on the nutrition information label

- Breadcrumbs

(5) type attribute (understand)

- `a`: lowercase letter

- `A`: capital letter

- `i`: lowercase Roman numerals

- `I`: uppercase Roman numerals

- `1`: number

```html

<ol type="I">

<li>Step 1</li>

<li>Step two</li>

</ol>

```

**Note:** The type attribute is not commonly used, and is usually replaced by the css attribute.

おすすめ

転載: blog.csdn.net/pbaiking/article/details/129228361