Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Ordered Lists

  • Ordered lists allow you to create lists with various bullet styles which reflect the level of hierarchy.

  • The basic ordered list involves three tags

  • The <OL> tag is used to open a list. The <LI> tag is used to signify a list element, and the </OL> tag is used to end a list.

  • For example, the following code could be used to create a list:

	<HTML>
	<HEAD>
	<TITLE>Ordered List</TITLE>
	</HEAD>
	<BODY>
	<B>Food</B>

	<OL>
	<LI>Vegetables

	<OL>
	<LI>Broccoli
	<LI>Carrot
	<LI>Pea
	</OL>

	<LI>Meat

	<OL>

	<LI>Chicken
	<LI>Beef
	<LI>Pork
	</OL>

	</OL>
	</BODY>
	</HTML>

  • The previous code would produce the following HTML list. Notice that the bullets are numbered according to their level in the hierarchy:

Food

  1. Vegetables
    1. Broccoli
    2. Carrot
    3. Pea
  2. Meat
    1. Chicken
    2. Beef
    3. Pork
Modifying the Bullet
  • You can modify the look of the bullets by using the TYPE [1] or START [2] attributes in the <OL> tag.

  • The TYPE attribute supports the following values: A, a, I, i, or 1.

  • The START attribute specifies at what point to start counting from.

  • Below is some code that demonstrates the usage of the TYPE and START attributes.
	<HTML>
	<HEAD>
	<TITLE>Ordered List</TITLE>
	</HEAD>
	<BODY>
	<B>Food</B>

	<OL TYPE = "A">
	<LI>Vegetables

	<OL TYPE = "a">
	<LI>Broccoli
	<LI>Carrot
	<LI>Pea
	</OL>

	<LI>Meat

	<OL TYPE = "a" START = "2">

	<LI>Chicken
	<LI>Beef
	<LI>Pork
	</OL>

	</OL>
	</BODY>
	</HTML>
  • The previous code would appear as follows:

Food

  1. Vegetables
    1. Broccoli
    2. Carrot
    3. Pea
  2. Meat
    1. Chicken
    2. Beef
    3. Pork

  • Notice that in this circumstance, the case of the TYPE argument matters.

Unordered Lists
Introduction to Web Design | Table of Contents
Definition Lists


Up to => Home / Authoring / HTML / Tutorial




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers