HTML List
HTML supports ordered, unordered and defined lists:
HTML List
First understand what are ordered lists and unordered lists?
Let’s first understand it through an example:
Ordered list
1. Beijing
2. Shanghai
3. Guangzhou
Unordered list
· Beijing
· Shanghai
· Guangzhou
HTML unordered list
An unordered list is a list of items marked with bold dots (typical small black circles) .
Unordered list uses <ul> tag
<html> <head> <meat charset="utf-8"> </head> <body> <ul> <li>北京</li> <li>上海</li> <li>广州</li> </ul> </body> </html>
HTML ordered list
Similarly, ordered list is also A list of items labeled with numbers. The ordered list starts with the <ol> tag. Each list item begins with a <li> tag.
List items are marked with numbers.
<html> <head> <meat charset="utf-8"> </head> <body> <ol> <li>北京</li> <li>上海</li> <li>广州</li> </ol> </body> </html>
HTML Custom List
A custom list is not just a list of items, but a combination of items and their comments.
Custom lists start with a <dl> tag. Each custom list item begins with <dt>. The definition of each custom list item begins with <dd>.
<html> <head> <meat charset="utf-8"> </head> <body> <dl> <dt>北京</dt> <dd> 政治中心</dd> <dt>上海</dt> <dd> 经融中心</dd> </dl> </body> </html>