What is a List and How to create in HTML?
List is nothing but any content arranged in specific order like following.
1. A
2. B
3. C
Lists are of two types ordered and unordered.
Now you know what is list but how to create lists in HTML?
To create lists in HTML <li> tag is used. But in which manner lists is arranged depends on type of lists. <li> tag is a container tag.
<ul> tag used for unordered lists and displayed as bullets.
This tag has attribute type which define type of bullet and its values are circle, disc, square. Default value is disc.
<ol> tag used for ordered lists and displayed in a proper order.
Following are attributes of <ol> tag:
1. Type : this attribute used to define a order type in list and has value 1, I, i, A, a.
Default value for ordered list is 1.
2. Reversed : this attribute defines a order in reversed manner.
3. Start : this attribute defines a number from which order is started.
Lists in html can be nested in one another.
Definition list:
To create definition list in HTML <dl> tag is used. With help of <dt> the term to define is created and <dd> tag definition of term is displayed.
Let’s now understand all this types through code.
Comments
Post a Comment