Here we are going to cover HTML lists. You can watch our video to understand HTML lists.
Many times we need to organize our data as numbered or bulleted list. There are 3 types of HTML list –
· Unnumbered List
· Numbered List
· Definition List
Ordered List – OL tag
In HTML Ordered List or Numbered List displays elements in numbered format.
To create an ordered list, you enclose your content within OL tag. Each list item within it is marked with LI tag.
Ordered List or OL has 2 attributes.
· type which has the values of 1, capital A, small a, capital I, small i. 1 being the default.
· start It can have any numeric value. It is used to specify the starting value of the integer counter.
Lets see them in in an example.
Unordered List – UL tag
In HTML unordered list displays list in bulleted format. To create such a list, you enclose the content within UL tag. Within it each list item is enclosed with LI tag.
UL tag has one attribute
· Type. It has values disc, circle, square and none. The default value for it is disc
Let’s see these in an example.
Description List DL tag
HTML Description List or Definition List displays elements in definition form like in dictionary
Description list is enclosed within DL tag. Each list item has a
- DT tag to define data term
- DD tag to define data definition or description.
Lets see this in this example.