Simple Lists

A lot of the things that you put into your web page are actually lists of things. Where the individual items you are puting into the page are anything other than paragraphs of text they are most likely list elements. Where we have a list of things to add to our web page we should add them to the page as list.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="">
<h1>Steve's Page</h1>
<p><img src="img/steve.jpg" width="66" height="92"
alt="Photo of Steve" title="This is a tooltip." /></p>
<p>This web page was written by Steve.</p>
Entry One</li>
Entry Two</li>
Third Entry</li></ul>
Entry One</li>
Entry Two</li>
Third Entry</li></ol>

Here's what the Lists page now looks like in your web browser.

Each entry in our list is contained within a <li> container that identifies that this is an entry within a list. We identify which list entries belong to the same list by placing them in either a <ul> or <ol> container.

Each Ordered List or Unordered List must not contain anything that is not contained within the LIst tags that contain the individual list elements. Whether you use an ordered or unordered list tag to define your list determines whether the default element marker is a sequential value or a simple bullet however the marker can be completely overridden in your stylesheet to show sequential values for unordered lists, simple bullets for ordered lists or no marker at all for either type of list.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow