sequential order. Each item is represented by the<li>(list item) element, and the browser automatically numbers the items in the list. Ordered lists are perfect for instructions, steps, ranking, or any data where order matters.
In the above example, you can see we have added an ordered list inside another ordered list. In this case, the list item of the outer ordered list also includes an ordered list. Similarly, we can also mix list types while nesting and add an unordered list inside the ordered list. For ...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Ordered List Example</title> </head> <body> <h2>购物清单</h2> <ol> <li>苹果</li> <li>香蕉</li> <li>橙子</li> </ol> </body> </html> 在这个例子中,购物清单被表示为一个有序列表,包含了三个项目:苹...
Example <ol> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> Try it Yourself » Ordered HTML Lists - The Type AttributeA type attribute can be added to an ordered list, to define the type of the marker:TypeDescription type="1" The list items will be numbered with numbers...
Control List Counting By default, an ordered list will start counting from 1. If you want to start counting from a specified number, you can use thestartattribute: Example <olstart="50"> <li>Coffee</li> <li>Tea</li> <li>Milk</li> ...
In the following example, we are nesting an unordered list within an ordered list. <!DOCTYPE html><html><head><title>HTML List</title></head><body><h2>Example of HTML Nested List</h2><ol><li>Item One</li><li>Item Two<ul><li>Subitem A</li><li>Subitem B</li></ul></li><li...
有序列表(Ordered List):用于表示按照一定顺序排列的项目,每个项目都有对应的标记。常见的例子包括步骤、流程等。 无序列表(Unordered List):用于表示没有特定顺序的项目列表,每个项目的标记通常是默认的实心圆点符号。常见的例子包括特征、优点、缺点等。
An unordered list (default)An unordered list with disc bulletsAn unordered list with circle bulletsAn unordered list with square bulletsAn unordered list without bulletsAn ordered list (default)An ordered list with numbersAn ordered list with lettersAn ordered list with lowercase lettersAn ordered lis...
{list-style-type:lower-alpha;}</style></head><body><p>Exampleofunordered lists:</p><ulclass="a"><li>语文</li><li>数学</li><li>英语</li></ul><ulclass="b"><li>语文</li><li>数学</li><li>英语</li></ul><p>Exampleofordered lists:</p><olclass="c"><li>语文</li><li...
In this case, the first and second list items of the outer unordered list include unordered lists. Ordered List inside Unordered List Similarly, we can also mix list types while nesting and add ordered lists inside the unordered list. For example, ...