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

Numbering

The document explains how to create lists in HTML, including ordered, unordered, and description lists using specific tags such as <ol>, <ul>, <li>, <dl>, <dt>, and <dd>. It provides examples for each type of list, demonstrating their structure and usage. Additionally, it highlights the ability to customize list styles using attributes and CSS.

Uploaded by

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

Numbering

The document explains how to create lists in HTML, including ordered, unordered, and description lists using specific tags such as <ol>, <ul>, <li>, <dl>, <dt>, and <dd>. It provides examples for each type of list, demonstrating their structure and usage. Additionally, it highlights the ability to customize list styles using attributes and CSS.

Uploaded by

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

HTML - Lists

HTML List is a collection of related infomation. The lists can be ordered or underdered
depending on the requirement. In html we can create both order and unorder lists by
using <ol> and <ul> tags. Each type of list can be decorated using porper attributes or CSS also.
There is one more list which is description list - HTML <dl>, <dt> & <dd> tag are used to
create description lists.

Lists in HTML

As HTML offers three ways for specifying lists of information namely ordered, unordered, and
definition lists. All lists must contain one or more list items.

HTML List Tags

Tag Description

<ul> Defines an unordered list

<ol> Defines an ordered list

<li> Defines a list item

<dl> Defines a description list

<dt> Defines a term in a description list

<dd> Describes the term in a description list


HTML Unorder Lists

Unorder lists are marked with bullet points, by using html <ul> & <li> tag we can create a
unorder list. This is also know as unorder list.

Example

In this example we will create 5 items in a unorder list.

<html>
<head>
<title>HTML List</title>
</head>
<body>
<h2>Example of HTML List</h2>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>Java</li>
<li>JavaFX</li>
</ul>
</body>
</html>

HTML Order Lists

Order list are marked with numbers by default, we can xhnage the number into alphabet, roman
numbers, etc. By using html <ol> & <li> tag we can create a order list and using type attribute
we can change the default numeric marking.

<html>
<head>
<title>HTML List</title>
</head>
<body>
<h2>Example of HTML List</h2>
<ol>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>Java</li>
<li>JavaFX</li>
</ol>
</body>
</html>
HTML Description Lists

Description list is list of items with description, to create a desccription list we can
use <dl>, <dt> & <dd> tag.

<html>
<head>
<title>HTML List</title>
</head>
<body>
<h2>Example of HTML List</h2>
<dl>
<dt>HTML</dt>
<dd>HyperText markup languague</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheet</dd>
<dt>JS</dt>
<dd>JavaScript</dd>
</dl>
</body>
</html>

You might also like