HTML list?

Html list are define into three ways.
a) Unordered list
b) Ordered list
c) Description list

Html unordered list:

Unordered list tag is started from <ul>, and each list items are started from <li>. Unordered list means the lists haven’t special order or sequence. The unordered list default style is small black circles.

//Unordered list Example:
<ul>
  <li>HTML</li>
  <li>HTML5</li>
  <li>CSS</li>
</ul> 

//Unordered list Attribute:
<ul type=”square”> 
<ul type=”disc”> 
<ul type=”circle”> 

Html – ordered list:

Ordered list tag is started from <ol>, and each list items are started from <li>. Ordered list means the lists have special order or sequence. The unordered list default style is mathematics number and this number auto incremented.

//Ordered list Attribute:
<ol>
  <li>HTML</li>
  <li>HTML5</li>
  <li>CSS</li>
</ol> 

//Ordered list Attribute:
<ol type=”1”> Default numbers 
< ol type=”I”> Uppercase roman numbers
< ol type=”i”> lowercase roman numbers
< ol type=”A”> Capital alphabet 
< ol type=”a”> Small alphabet

Html list Start Attribute:

Ordered lists are also allowed the attribute to starting value of numbering that you need.

<ol type=”1” start=”5”> Default numbers start from 5
<ol type=”I” start=”5”> Uppercase roman numbers start from V
<ol type=”i” start=”5”> lowercase roman numbers start from v
<ol type=”A” start=”5”> Capital alphabet start from E
<ol type=”a” start=”5”> Small alphabet start from e

HTML description Lists:

Html description lists start with the (dl) tag. These lists displace the word term (dt) in such some way that it rests simply higher than the definition data (dd) to supply a really distinctive look.

<dl>
  <dt> HTML </dt>
    <dd> Hyper Text Markup Language</dd>
  <dt> CSS </dt>
    <dd> Cascading stylesheet </dd>
  </dt>
</dl>

HTML Nested Lists:

List can be nested, you can use multi lists inside the main list. If you make the nested lists you can write the list tags inside the list item<li>.

<ul>
  <li>Coffee</li>
  <li>Tea
    <ul>
      <li>Black tea</li>
      <li>Green tea</li>
    </ul>
  </li>
  <li>Milk</li>
</ul> 

Leave a Comment.