HTML List (Ordered, Unordered, Description List)
0 4645
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 on 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, the 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.Example 1: by default, it will display the 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
<ul type="1">Example 2: it will display Numerals.
<li> Mobile </li>
<li> Watch </li>
<li> Laptop </li>
</ul>
<ul type="i">
<li> Mobile </li>
<li> Watch </li>
<li> Laptop </li>
</ul>
Example 3: it will display Letters.
<ul type="a">
<li> Mobile </li>
<li> Watch </li>
<li> Laptop </li>
</ul>
<dl> Used for description list
Example 1:<dl>
<dt> CT </dt>
<dd> This stands for Coding Tag </dd>
</dl>
Share:
Comments
Waiting for your comments