HTML List (Ordered, Unordered, Description List)

Lists are used everywhere on the web. You can see that the developers and web users are frequently using the list of website navigation menus, articles, and product features on e-commerce websites and many other places.

HTML offers three ways of indicating the lists of information in a web page. All lists must include one or more list elements. Lists may hold below elements:

<ul> – This is an unordered list. This will show plain bullets in lists.

<ol> – This is an ordered list. This will create a numbered list in which different schemes of numbers available to list your items.

<dl> – This is a definition list. This will arrange the list, same as a dictionary.

 HTML has one more important tag which helps to start the list:

<li> – This tag is used to define the list item. Each item of the list starts with this tag.

Now See The Examples of All the List Tags:




Example 1: by default it will display disc

<ul type="disc">
<li> Mobile </li>
<li> Watch </li>
<li> Laptop </li>
</ul>

Example 2:

<ul type="square">
<li> Mobile </li>
<li> Watch </li>
<li> Laptop </li>
</ul>

Example 3:

<ul type="circle">
<li> Mobile </li>
<li> Watch </li>
<li> Laptop </li>
</ul>

<ol> – An ordered list.
Example 1: by default it will display default numerals

<ol type="1">
<li> Mobile </li>
<li> Watch </li>
<li> Laptop </li>
</ol>

Example 2: it will display Numerals.

<ol type="i">
<li> Mobile </li>
<li> Watch </li>
<li> Laptop </li>
</ol>

Example 3: it will display Letters.

<ol type="i">
<li> Mobile </li>
<li> Watch </li>
<li> Laptop </li>
</ol>

<dl> Used for description list
Example 1:

<dl>
<dt> OTI </dt>
<dd> This stands for onTime Infotech </dd>
<dt> <b> HTTP </b> </dt>
<dd> This stands for Hyper Text Transfer Protocol </dd>
</dl>

Coding Tag

Coding Tag always happy to serve you in Information Technology (IT). Learn HTML, CSS, Javascript, PHP, Android, Digital Marketing, Latest IT News and many more.

Leave a Reply

avatar
  Subscribe  
Notify of