bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/HTML/HTML Foundations Practice
HTML•HTML Foundations Practice

HTML Lists

Concept visual

HTML Lists

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

HTML lists allow web developers to group a set of related items in lists.

Example

An unordered HTML list:

Item

Item

Item

Item

An ordered HTML list:

First item

Second item

Third item

Fourth item

Unordered HTML List

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:

Example

<ul>

Formula

< li > Coffee </li >
< li > Tea </li >
< li > Milk </li >

</ul>

Ordered HTML List

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:

Example

<ol>

Formula

< li > Coffee </li >
< li > Tea </li >
< li > Milk </li >

</ol>

HTML Description Lists

HTML also supports description lists. 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:

Example

<dl>

Formula

< dt > Coffee </dt >

<dd>- black hot drink</dd>

Formula

< dt > Milk </dt >

<dd>- white cold drink</dd> </dl>

HTML List Tags

Tag

Description

<ul>

Previous

HTML Tables Code Challenge

Next

HTML Lists Code Challenge