Example - Lists

Previous page...

Unordered Lists

An unordered list is designated by the ' ul ' tag. For each new List Item a ' li ' tag is required. Each new list item is on a new line and is prefixed with a bullet point.

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday

Ordered Lists

An ordered list is designated by the ' ol ' tag. As before, for each new List Item a ' li ' tag is required. Each new list item is on a new line and is prefixed with a sequential number.

  1. Monday
  2. Tuesday
  3. Wednesday
  4. Thursday
  5. Friday

Definition Lists

Definition lists are slightly different. A definition list is designated by the ' dl ' tag. For each new Definition Term a ' dt ' tag is required. For each new Definition Term a Definition Description is required. This is acheved using the ' dd ' tag.

HTML
HyperText Mark-up Language
URL
Uniform Resource Locator
Browser
An application for accessing the WWW
WWW
World Wide Web
Hyperlink
A link to another document, to any resource or place within a document.

Nested Lists

Lists can also be nested one inside the other. In this example the primary list (days of the week), is supplemented by a secondary list for times on Wednesday.

  • Monday
  • Tuesday
  • Wednesday
    • 6am - 9am
    • 9am - 12n
    • 12n - 3pm
    • 3pm - 6pm
  • Thursday
  • Friday

The HTML

<html>
<head>
	<title>Lists</title>
</head>

<body>
	
<h2>Unordered Lists</h2>

<p>An unordered list is designated by the ' ul ' tag. For each new
List Item a ' li ' tag is required.
Each new list item is on a new line and is prefixed with a bullet point.

	<ul>
		<li>Monday
		<li>Tuesday
		<li>Wednesday
		<li>Thursday
		<li>Friday
	</ul>
	

<h2>Ordered Lists</h2>

<p>An ordered list is designated by the ' ol ' tag. As before, for
each new List Item a ' li ' tag is required. Each new list item is on a
new line and is prefixed with a sequential number.

	<ol>
		<li>Monday
		<li>Tuesday
		<li>Wednesday
		<li>Thursday
		<li>Friday
	</ol>
	
<h2>Definition Lists</h2>

<p>Definition lists are slightly different. A definition list is
designated by the ' dl ' tag. For each new Definition Term a ' dt ' tag
is required. For each new Definition Term a Definition Description is
required. This is acheved using the ' dd ' tag.

	<dl>
		<dt>HTML
			<dd>HyperText Mark-up Language
		<dt>URL
			<dd>Uniform Resource Locator
		<dt>Browser
			<dd>An application for accessing the WWW
		<dt>WWW
			<dd>World Wide Web
		<dt>Hyperlink 
			<dd>A link to another document,
			 to any resource or place within a document.
	</dl>
	
<h2>Nested Lists</h2>

<p>Lists can also be nested one inside the other. In this example
the primary list (days of the week), is supplemented by a secondary list
for times on Wednesday.	
	
	<ul>
		<li>Monday
		<li>Tuesday
		<li>Wednesday
			<ul>
				<li>6am - 9am
				<li>9am - 12n
				<li>12n - 3pm
				<li>3pm - 6pm
			</ul>
		<li>Thursday
		<li>Friday
	</ul>	

</body>
</html>
		

Back to Top of Page

© 2003 Ashley Preston 

Computeach International Ltd