There are three list types in HTML:

<ul>unordered list</ul>
<ol>ordered list</ol>
<dl>definition list</dl>

Each item begins with a <li> tag.






UNORDERED list <ul> used to group a set of related items in no particular order

code:



<ul>

<li>Gold</li>
<li>Silver</li>
<li>Bronze</li>

</ul>

result:


  • Gold
  • Silver
  • Bronze





ORDERED list <ol> used to group a set of related items in a specific order

code:



<ol>

<li>Gold</li>
<li>Silver</li>
<li>Bronze</li>

</ol>

result:


  1. Gold
  2. Silver
  3. Bronze





DESCRIPTION list <dl> used to display name/value pairs such as terms and definitions

code:



<dl> 
<dt>FRUIT</dt>
<dd>apple</dd>
<dd>pear</dd> 
<dt>VEGETABLES</dt>
<dd>cucumber</dd> 
<dd>tomatoes</dd>
</dl>

result:


FRUIT
apple
pear
VEGETABLES
cucumber
tomatoes





Privacy Policy