List
List
Syntax:
<ol>
<li>...</li>
<li>...</li>
<li>...</li>
</ol>
Type Description
Type "1" This is the default type. In this type, the list items are numbered with numbers.
Type "I" In this type, the list items are numbered with upper case roman numbers.
Type "i" In this type, the list items are numbered with lower case roman numbers.
Type "A" In this type, the list items are numbered with upper case letters.
Type "a" In this type, the list items are numbered with lower case letters.
Number List
HTML Numbered Lists <ol> tag creates an ordered list. Each item is listed sequentially, typically denoted by
numbers.
Uppercase Letters
HTML Uppercase Letters Utilize the “type” attribute within the <ol> tag, set to “A” to generate an ordered
list with uppercase alphabetical enumeration.
Lowercase Letters
HTML Lowercase Letters Utilize the “type” attribute within the <ol> tag, set to “a” to create an ordered list
with lowercase alphabetical numbering.
Uppercase Roman Numbers
HTML Uppercase Roman Numbers is set by the “type” attribute within the <ol> tag to “I” for an ordered list
with uppercase Roman numeral enumeration.
HTML Lowercase Roman Numbers is use the “type” attribute within the <ol> tag, set to “i” for an ordered
list with lowercase Roman numeral enumeration.
HTML Control List Counting we use the “start” attribute within the <ol> tag to specify the starting number
for ordered lists, customizing counting
Start attribute
The start attribute is used with ol tag to specify from where to start the list items.
<ol type="1" start="5"> : It will show numeric values starting with "5".
<ol type="A" start="5"> : It will show capital alphabets starting with "E".
<ol type="a" start="5"> : It will show lower case alphabets starting with "e".
<ol type="I" start="5"> : It will show Roman upper case value starting with "V".
reversed Attribute:
This is a Boolean attribute of HTML <ol> tag, and it is new in HTML5 version. If you use the reversed
attribute with tag then it will numbered the list in descending order (7, 6, 5, 4......1).
HTML Nested Ordered Lists use <ol> within <li> tags to create sublists, enhancing organization and
structure for hierarchical content presentation.
An HTML Unordered List (<ul>) displays elements in a bulleted format. List items within an unordered list
are defined using the <li> tag. The <ul> tag requires both opening and closing tags.
Syntax:
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
To represent different ordered lists, there are 4 types of attributes in <ul> tag.
Type Description
Type "disc" This is the default style. In this style, the list items are marked with bullets.
Type "circle" In this style, the list items are marked with circles.
Type "square" In this style, the list items are marked with squares.
Type "none" In this style, the list items are not marked .
The <dl> tag defines the description list, the <dt> tag defines the term (name), and the <dd> tag describes
each term:
Tags Descriptions
<dt> This tag defines the data terms inside the list.