Lists give us a very powerful way to communicate information by creating an individual line for each item.
Consider a recipe for cookies or a step-by-step procedure on how to do an oil change. Lists place elements in an order that are much simpler to digest.
There are two basic types of lists in HTML: ordered lists and unordered lists
Unordered lists are used when you want to present a set or list of information in bullet point form.
The user does not need to be given in a specific order on how to process or understand the list. An unordered list would be useful to show a list of required items needed for a class.
<ul>
<li>list element one</li>
<li>list element two</li>
<li>list element three</li>
</ul>
Ordered lists contain a array of elements that in order to complete a process properly, steps must be taken in a certain order.
By default, elements in an ordered list are each labeled with a number. (1, 2, 3, and so on).
We use ordered lists when it is critical that the steps be followed in a specific order.
<ol>
<li>list element one</li>
<li>list element two</li>
<li>list element three</li>
</ol>
There are times when we don't want or need bullet points or numbers for each individual line element. Data Lists are great for this.
See, no bullets or numbers preceding the items.
<dl>
<dt>shoelace</dt>
<dt>violin</dt>
<dt>fruit</dt>
</dl>
<dl class="bordered">
<dt>list element one</dt>
<dt>list element two</dt>
<dt>list element three</dt>
</dl>
To search only the Information Technology Services website, enter text in the box below, then click 'Search'.