0% found this document useful (0 votes)
6 views3 pages

List

The document explains the three types of HTML lists: ordered lists (<ol>), unordered lists (<ul>), and description lists (<dl>). It details the syntax and attributes for creating ordered lists, including types for numbering and starting points, as well as the different styles for unordered lists. Additionally, it describes the structure of description lists and the corresponding tags used to define terms and their descriptions.

Uploaded by

gangurdepunam124
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

List

The document explains the three types of HTML lists: ordered lists (<ol>), unordered lists (<ul>), and description lists (<dl>). It details the syntax and attributes for creating ordered lists, including types for numbering and starting points, as well as the different styles for unordered lists. Additionally, it describes the structure of description lists and the corresponding tags used to define terms and their descriptions.

Uploaded by

gangurdepunam124
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

An HTML list is a record of related information used to display the data or any information on web pages

in the ordered or unordered form.

There are three different types of HTML lists:

1. Ordered List or Numbered List (ol)


2. Unordered List or Bulleted List (ul)
3. Description List or Definition List (dl)

1. Ordered List or Numbered List (ol)


 HTML Ordered List is created by the HTML <ol> tag, to display elements in an ordered form, either
numerical or alphabetical.
 Within the <ol> tag, list items <li> are used to define the items in sequential order.

Syntax:

<ol>
<li>...</li>
<li>...</li>
<li>...</li>
</ol>

Ordered HTML List - The Type Attribute

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.

Lowercase Roman Numbers

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.

Control List Counting

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).

Nested Ordered Lists

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>

There can be 4 types of bulleted list:

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 .

HTML Description Lists

A description list is a list of terms, with a description of each term.

The <dl> tag defines the description list, the <dt> tag defines the term (name), and the <dd> tag describes
each term:

Description Lists Tags

Tags Descriptions

<dl> This tag defines the description list.

<dt> This tag defines the data terms inside the list.

<dd> This tag defines the description of data.

<dl> tag defines the description list.

<dt> tag defines data term.

<dd> tag defines data definition (description).

You might also like