HTML Lists enable us to group a set of related items in lists.
List Types
There are 3 List types in HTML
- Ordered List – Used to group a set of related items in no particular order
- Unordered List – Used to group a set of related items in a specific order
- Description List – Used to display name/value pairs such as terms and definitions
Example
Ordered List
- First Item
- Second Item
- Third Item
Unordered List
- List Item
- List Item
- List Item
Description List
- Java
- Programming Language
- HTML
- Markup Language
- JavaScript
- Scripting Language
Ordered List
<ol> <li>First Item</li> <li>Second Item</li> <li>Third Item</li> </ol>
Unordered List
<ul> <li>List Item</li> <li>List Item</li> <li>List Item</li> </ul>
Description List
<dl> <dt>Java</dt> <dd>Programming Language</dd> <dt>HTML</dt> <dd>Markup Language</dd> <dt>JavaScript</dt> <dd>Scripting Language</dd> </dl>