HTML supports ordered, unordered and definition lists.
Examples
An unordered listThis example demonstrates an unordered list.
An ordered listThis example demonstrates an ordered list.
(You can find more examples at the bottom of this page)
Unordered Lists
An unordered list is a list of items. The list items are marked with bullets (typically small black circles).
An unordered list starts with the
- tag. Each list item starts with the
- tag.
- Coffee
- Milk
Here is how it looks in a browser:
Coffee
Milk
Inside a list item you can put paragraphs, line breaks, images, links, other lists, etc.
Ordered Lists
An ordered list is also a list of items. The list items are marked with numbers.
An ordered list starts with the- tag. Each list item starts with the
- tag.
- Coffee
- Milk
Here is how it looks in a browser:
Coffee
Milk
Inside a list item you can put paragraphs, line breaks, images, links, other lists, etc.
Definition Lists
A definition list is not a list of items. This is a list of terms and explanation of the terms.
A definition list starts with the- tag. Each definition-list term starts with the
- tag. Each definition-list definition starts with the
- tag.
- Coffee
- Black hot drink
- Milk
- White cold drink
Here is how it looks in a browser:
Coffee
Black hot drink
Milk
White cold drink
Inside a definition-list definition (the- tag) you can put paragraphs, line breaks, images, links, other lists, etc.
More Examples
Different types of ordered listsThis example demonstrates different types of ordered lists.
Different types of unordered ListsThis example demonstrates different types of unordered lists.
Nested listThis example demonstrates how you can nest lists.
Nested list 2This example demonstrates a more complicated nested list.
Definition listThis example demonstrates a definition list.
List Tags
Tag
Description
Defines an ordered list
Defines an unordered list
Defines a list item
Defines a definition list
Defines a definition term
Defines a definition description
Deprecated. Use
0 comments:
Post a Comment