HOME

HTML Basic
HTML HOME
HTML & WWW
HTML Introduction
HTML Elements
HTML Basic Tags
HTML Formatting
HTML Entities
HTML Links
HTML Frames
HTML Tables
HTML Lists
HTML Forms
HTML Images
HTML Background

HTML Advanced
HTML Layout
HTML Fonts
HTML 4.0 Why
HTML Styles
HTML Head
HTML Meta
HTML URLs
HTML Scripts
HTML Webserver

Examples/Quiz
HTML Examples
HTML Quiz Test

References
HTML Quick List
HTML Tag List
HTML Attributes
HTML Events
HTML ASCII
HTML Entities
HTML Colors
HTML Colorvalues
HTML Colornames
HTML HTTP
Download XMLSpy here
Please visit our sponsors !

HTML Lists

Previous Next

HTML supports ordered, unordered and definition lists.


Examples

An unordered list
This example demonstrates an unordered list.

An ordered list
This example demonstrates an ordered list.

More Examples


Unordered Lists

An unordered list is a list of items. The list items are marked with bullets (typically small black circles).

An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.

<ul>
<li>Coffee</li>
<li>Milk</li>
</ul>

Here is how it looks in a browser:

  • Coffee
  • Milk

Inside a list item you can put paragraphs, line breaks, images, links, other lists, etc.


Ordered Lists

An ordered list is also a list of items. The list items are marked with numbers.

An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.

<ol>
<li>Coffee</li>
<li>Milk</li>
</ol>

Here is how it looks in a browser:

  1. Coffee
  2. Milk

Inside a list item you can put paragraphs, line breaks, images, links, other lists, etc.


Definition Lists

A definition list is not a list of items. This is a list of terms and explanation of the terms.

A definition list starts with the <dl> tag. Each definition-list term starts with the <dt> tag. Each definition-list definition starts with the <dd> tag.

<dl>
<dt>Coffee</dt>
<dd>Black hot drink</dd>
<dt>Milk</dt>
<dd>White cold drink</dd>
</dl>

Here is how it looks in a browser:

Coffee
Black hot drink
Milk
White cold drink

Inside a definition-list definition (the <dd> tag) you can put paragraphs, line breaks, images, links, other lists, etc.


Examples

Different types of ordered lists
This example demonstrates different types of ordered lists.

Different types of unordered Lists
This example demonstrates different types of unordered lists.

Nested list
This example demonstrates how you can nest lists.

Definition list
This example demonstrates a definition list.


List Tags:

NN: Netscape, IE: Internet Explorer, W3C: Web Standard

Start Tag NN IE W3C Purpose
<ol> 3.0 3.0 3.2  Defines an ordered list
<ul> 3.0 3.0 3.2  Defines an unordered list
<li> 3.0 3.0 3.2 Defines a list item
<dl> 3.0 3.0 3.2  Defines a definition list
<dt> 3.0 3.0 3.2 Defines a definition term
<dd> 3.0 3.0 3.2  Defines a definition description
<dir>       Deprecated. Use <ul> instead
<menu>       Deprecated. Use <ul> instead


Previous Next

Jump to: Top of Page or HOME or Printer Friendly Printer friendly page


Search W3Schools:


What Others Say About Us

Does the world know about us? Check out these places:

Dogpile Alta Vista MSN Google Excite Lycos Yahoo Ask Jeeves


We Help You For Free. You Can Help Us!


W3Schools is for training only. We do not warrant its correctness or its fitness for use. The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 1999-2002 by Refsnes Data. All Rights Reserved


Validate How we converted to XHTML Validate

ASPHits
Active Server Pages Resource Web Site


Your own Web Site?

Read W3Schools
Hosting Tutorial



$15 Domain Name
Registration
Save $20 / year!



Advertise
at W3Schools

Only 0.5 CPM



SELECTED LINKS

University Online
Master Degree
Bachelor Degree


Web Software

The Future of
Web Development


Jobs and Careers

Web Security
Web Statistics
Web Standards


PARTNERS

W3Schools
TopXML
VisualBuilder
XMLPitstop
DevelopersDex
DevGuru
Programmers Heaven
The Code Project
Tek Tips Forum
ZVON.ORG
TopXML Search