8 August 2010

This tutorial shows different kinds of HTML lists. There are lists with bullets, numbers, etc...

Here are basic examples of lists, but it's possible to do everything that can be done in any word processor.

Numbers:

This list is also called to ordered list(ol), but I prefer numbered list. Tags that are used are ol and li.
Source code viewer
  1. <ol>
  2. <li>First</li>
  3. <li>Second</li>
  4. </ol>
Programming Language: HTML
How this looks in browser:
  1. First
  2. Second

Bullets:

This list is also called to unordered list(ul), but I prefer bulleted list. Tags that are used are ul and li.
Source code viewer
  1. <ul>
  2. <li>First</li>
  3. <li>Second</li>
  4. </ul>
Programming Language: HTML
How this looks in browser:
  • First
  • Second

Definitions:

This list has no numbers or bullets, but it has two sub levels. Tags that are used are ul and li.
Source code viewer
  1. <dl>
  2. <dt>First</dt>
  3. <dd>Sub First</dd>
  4. <dt>Second</dt>
  5. <dd>Sub Second</dd>
  6. </dl>
Programming Language: HTML
How this looks in browser:
First
Sub First
Second
Sub Second
This is very basic example for more information visit: HTML Lists. You can change visual looks of bullets or numbers. Like roman numbers or sqare bullets. There is possibility to continue lists and so on. What you can do in word you can do in HTML lists.