Southend Linux User Group

Lists and Forms

Ordered Lists

The is an example of an ordered list, denoted by the <ol> tags. Each item in the list is enclosed in list (<li>) tags. The numbering is generated for you. If you move items around in the list, they are automatically renumbered.

This example has also introduced some background color by adding the bgproperty to the body tag. The value #a7daff represents the Red (a7) Green (da) and Blue (ff) components of the color as hexadecimal numbers. RGB for short. Values range from 0 to 255 (which is the decimal equivalent of the hexadecimal number ff). So you have a choice of 255 x 255 x 255 = (mathematicians would say 2553 ) which gives you 16,581,375 colors plus black (#000000). White incidentally is #ffffff.

Don’t worry if your not familiar with hexadecimal (or base 16) numbers. Most browsers support a set of standard colors so you can simply enter a color name. For example lightblue (which incidentally is #add8e6) would be entered as
<BODY bgcolor=”lightblue”>
There are no spaces in color names. If the browser doesn’t recognise the colour you have entered, it will probably ignore it. If you choose a black background, and your text is black it will disappear into the background. So you must change the color of text to (say) white with the <FONT> command like this,

<FONT color=”#ffffff”> This is white text on a black background</FONT>

The <FONT> command should not be used because its been superceded they style commands,
Cascading Style Sheets (CSS). Likewise the property bgcolor, used in the <BODY> tag in this instance.

Here is link to a color mixer so you can mix up your own colors

Ex – Ordered Lists


HTML code


Author: Alan Campion - Page reference: 2782
Last modified: paul - 2015-08-23