HTML List Example
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
The list items will be marked with bullets (small black circles) by default:
See this example:
The CSS list-style-type property is used to define the style of the list item marker:
Value | Description |
---|---|
disc | Sets the list item marker to a bullet (default) |
circle | Sets the list item marker to a circle |
square | Sets the list item marker to a square |
none | The list items will not be marked |
See this example:
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
The list items will be marked with bullets (small black circles) by default:
See this example:
You can use type attribute for <ol> tag to specify the type of numbering you like. By default, it is a number. Following are the possible options :-
Value | Description |
---|---|
<ol type = "1"> | Default-Case Numerals |
<ol type = "I"> | Upper-Case Numerals |
<ol type = "i"> | Lower-Case Numerals |
<ol type = "A"> | Upper-Case Letters |
<ol type = "a"> | Lower-Case Letters |
See this example:
Basically a definition list is composed of three HTML elements and some text. These are the <dl>, <dt> and <dd> elements.
Value | Description |
---|---|
<dl> | Defines the start of the list |
<dt> | A term |
<dd> | Term definition |
</dl> | Defines the end of the list |
See this example: