HTML Lists
HTML lists allow web developers to group a set of related items in lists.
There are three types of lists in HTML: unordered lists, ordered lists, and description lists.
HTML lists allow web developers to group a set of related items in lists.
There are three types of lists in HTML: unordered lists, ordered lists, and description lists.
An unordered list starts with the <ul>
tag. Each list item starts with the <li>
tag. The list items will be marked with bullets (small black circles) by default. Here is an example of how to create an unordered list in HTML:
An ordered list starts with the <ol>
tag. Each list item starts with the <li>
tag. The list items will be marked with numbers by default. Here is an example of how to create an ordered list in HTML:
A description list is a list of terms, with a description of each term. The <dl>
tag defines the description list, the <dt>
tag defines the term (name), and the <dd>
tag describes each term. Here is an example of how to create a description list in HTML:
<dl>
<dt>Term 1</dt>
<dd>Description 1</dd>
<dt>Term 2</dt>
<dd>Description 2</dd>
</dl>