Click here!

Upload    Contact    Home


R E S O U R C E S

HTMLStuff:

 
 
Home
Artist
Designer
Webmaster
Programmer
What's New
* Resources
 

 

 

Making Lists With HTML

Many things on Web pages need to be put into a list format. This can be a problem, however, because most content on the Web is updated often. This can cause problems, for instance when adding to a numbered list, you have to move all of the numbers below the one you add. Indenting can be difficult as well. Fortunately, the HTML language has fixes around these problems with the list codes we're about to see.

Unordered Lists: <ul>

Unordered lists are basically just bulleted lists. There is no specific order to the list, each item simply has some sort of marker to let you know it is a list. Here is an example:

  • List item.
  • Here's another.
  • This is one too.

Here is the code for the above example:

<ul>
<li> List item.</li>
<li> Here's another.</li>
<li> This is one too.</li>
</ul>

<ul> attributes
Attribute Properties Description
compact none Makes the list smaller and more compact.
type disc Uses a disc shaped bullet.
type circle Uses a circle shaped bullet.
type square Uses a square shaped bullet.

Examples of the above extra attributes:

<ul compact type="circle">
<li> List item.</li>
<li> Here's another.</li>
<li> This is one too.</li>
</ul>

That code would create this list:

  • List item.
  • Here's another.
  • This is one too.

Ordered Lists: <ol>

Ordered lists are probably the most useful lists. The numbering is automatic so it's easy to change the order in large lists, and you can use any numbering type you'd like. You can also specify a starting value which is nice in case you don't want to start off at 1.

  1. First list item.
  2. Second list item.
  3. Third list item.

Here is the code for the above example:

<ol>
<li> First list item.</li>
<li> Second list item.</li>
<li> Third list item.</li>
</ol>

<ol> attributes
Attribute Properties Description
type 1 Uses numbers to count (default).
type A Uses capital letters to count.
type a Uses small letters to count.
type I Uses large roman numerals to count.
type i Uses small roman numerals to count.
start (number) What number to start the list at.
value (number) The value of an item. This attribute goes on the <li> tag.

Say you wanted to create a list that counted with large letters and wanted to start counting with the letter C. It would look like this:

  1. First list item.
  2. Second list item.
  3. Third list item.

Here is the code for the above example:

<ol type="A" start=3>
<li> First list item.</li>
<li> Second list item.</li>
<li value="10"> Third list item.</li>
</ol>

Note that the start and value attribute use numbers, regardless of what type of list you are creating.

Definition Lists: <dl>

The definition lists are the simplest lists, made for glossary-type applications. These simply indent, and are a great way of indenting whether you are creating a list or not.

Not indented.
Indented.
Not indented.
Indented.

The code:

<dl>
<dt> Not indented.</dt>
<dd> Indented.</dd>
<dt> Not indented.</dt>
<dd> Indented.</dd>
</dl>

In literal terms, the <dt> tag stands for "definition term", and the <dd> tag stands for "definition definition". Since they were created they have been used for indenting mostly and their literal names have been forgotten.



Back to Tutorial Menu
Back to Designer Main Page
Back To HTML Stuff Main Page

 

  News   Contact   Advertise   CD ROM   Search   Upload   Help   Home

Copyright © 2000 Tucows.Com Inc.
TUCOWS.Com Inc. has no liability for any content or goods on the TUCOWS site or the Internet, except as set forth in the terms and conditions and privacy statement.