How to Create List in HTML

How To Create List in HTML?

Lists are very important in HTML. It is essential part of any web site. Do you know how to create list in HTML with the different formats using CSS. Lists are generally divided into three types in HTML. They are named as ordered list, un-ordered list and definition or description list. Now we will discuss them in detail.

What is List ?
List is a number of connected items, goods and names that are generally written or printed below the next one. Every list must have some items, they may have a specific order, they may not have specific order or they have some description. The list items may be written or printed in different styles for different formats. It may be in sequence or may not. Sometimes goods or item may need to describe in definition styles. How to create list in HTML. There are three types of lists. There are named as Un-ordered list, Ordered list and Definition list or description list.  They have also some styles attributes as well. We will discuss all of these one by one with different styles for each.

Un-Ordered List

un-ordered lists are the lists of items marked with bullets. <ul> tag is used to express the un-ordered list. Bullets are generally small and black. Each list item is expressed with <li> tag.   This list has some styles attributes, that we may change the bullets into circle, square and none as well, to do this you have to  add an attribute to the <ul> tag such as <ul list-style-type:square>. 

StyleFunction
Disc items will be marked as bullets
Square items will be marked as square
Circle items will be marked as circle
None Item will not be marked  

This  is an example of unordered list. The default list style is disc. You can change it according to your requirements, as I describe in above table. You just have to make change in list-style-type value.

<!DOCTYPE HTML

<html>

<head>
<title>This is your title </title>

</head>

<body>
<ul style="list-style-type:circle">

<li>First Item </li><li>Second Item </li>
<li>Thired Item </li>
</ul>

</body>
</html>


Ordered List
Ordered lists are also known as numeric lists. <ol>  tag is used to express the ordered list. This is pair tag. The default style for this list is numeric. You can change it as your requirements.

TypeFunction
1 items will be numbers as Numeric
a items will be numbered as Lowercase letters
A items will be numbered as Uppercase letters
I Item will be numbered as Roman numbers
This  is an example of odered list. The default list style is Numeric (1). You can change it according to your requirements, as I describe in above table. You just have to make change in type value.

<!DOCTYPE HTML

<html>

<head>
<title>This is your title </title>

</head>

<body>
<ol type="A">
    <li>First Item</li>

    <li>Second Item</li>
    <li>Thired Item</li>
</ol>

</body>
</html>

Definition List 
Definition list is list of  items with some description. It is also known as description list. <dl > tag is used to describe the definition list. <dt> is definition term and <dd> is definition description, to learn better about the list and how to create  list in HTML and how to format list with CSS. 

<!DOCTYPE HTML

<html> 

<head>
<title>This is your title </title>

</head>

<body>
<dl>
 <dt>Blogger</dt>
<dd>Blogger is free tool by Google to make free website</dd>
<dt>YouTube </dt>
<dd>Blogger is free tool by Google to make free website</dd>
</dl>

</body>
</html>

Did you have any question about lists. you can ask me any time. Don't forget to like this post and share as well. like my Facebook Fan page.

Post a Comment

If you have any question related to the above post you can comment below

Previous Post Next Post