HTML Lists
Lists is used to display list of data in an order.
<li> tag is used to define list. ie, Each list item starts with the <li> tag.
List can be defined in two ways
- Unordered List (<ul> tag)
- Ordered List (<ol> tag)
Unordered List
The <ul> tag defines Unordered List.
<ul> tag is used when there is no need for sequential order.
The <ul> element represents an unordered list of items, it represents list items by symbols.
Unordered list is declared using <ul> tag and all of its list items are written inside the <li> tag.
type attribute in Unordered List(<ul>)
type attribute is used to specify the type of symbols to be used in the
In <ul> tag, type attribute can have one of the following values.
- disc (default)
- circle
- square
- none
Ordered List
The <ol> tag defined as Ordered List.
The <ol> element represents an ordered list of items, it represents list items by characters or numbers.
Ordered list declared using the <ol> tag and all of its list items are be written inside the <li> tag.
type attribute in ordered List(<ol>)
type attribute is used to specify the type of symbols to use in the markers.
In <ol> tag, type attribute can have one of the following values.
- type="1" (Default value)
- type="A"
- type="a"
- type="I"
- type="i"
Description List in HTML
Description list is defined inside the <dl> tag.
<dl> tag contain <dt> and <dd> tag.
<dt> define description title.
<dd> define description data.