Lists



Note:     Before starting on the advanced topics, I want to introduce you to the new genre of writing HTML. If you have noticed so far, I have been using all CAPS for the HTML tags. You dont have to. In fact, it is better if you dont. Until XHTML came around, it was suggested that HTML be written in CAPS because of easier readablility. You can differentiate between the HTML tags and the normal text you wanna put on the webpage. But the XHTML standards require you to use small caps for all the html tags. If you do not know what XHTML means, no problem. You dont have to. It is just a cross between HTML and XML. But, just to stay with the advances in web technology, I'm gonna be using small caps for the tags, so dont get confused. You can opt to use anything thats comfortable with you. Now on the lists.

There are three types of lists:

The following is a demonstration of an ordered list.
<!--Other stuff on the page-->
<ol>
<li>First list item</li>
<li>Second list item</li>
<li>Third list item</li>
<!--You can add how many ever list items you want. But, remember to close each item with the </li>.-->
</ol>

that gives →
  1. First list item
  2. Second list item
  3. Third list item

As you can see, the numbers are automatically added when you declare it as an ordered list.

The following is an unordered list. Note the only difference between an ordered and unordered list is the <ol> and <ul> tags.

<ul>
<li>First list item</li>
<li>Second list item</li>
<li>Third list item</li>
<!--You can add how many ever list items you want. But, remember to close each item with the </li>.-->
</ul>

Note that bullets are added in place of numbers for the list items.

The following is a definition list. It is a little different from the ordered and unordered lists in that it has two not one list item - the definition term(term to be defined) and the definition.

<dl>
<dt>First term</dt>
<dd>Definition of the first term</dd>
<dt>Second term</dt>
<dd>Definition of the second term</dd>
<!--Add how many ever definitons you please-->
</dl>

That gives →

First term
Definiton of the first term
Second term
Definition of the second term
So much for lists. Tables are coming soon.

HTML home
pavithras@hotmail.com