Prev NEXT

How Web Pages Work

Adding Background Color

Change the background color of your page by adding bgcolor="color" within the tag.

Example: <body bgcolor="yellow">

Advertisement

Again, as was described in the section on changing font color, you can use most standard colors, or use a Hexadecimal Color Code.

Creating Lists

There are three types of lists you can create: Unordered, Ordered and Descriptive.

Unordered List

An unordered list looks like this:

  • California
  • Oregon
  • North Carolina

An unordered list is a bulleted list initiated by the tag <ul>. The tag <li> (short for List Item) is used before each item in the list. The closing tag </ul> ends the list.

Example:

<ul>
<li>California
<li>Oregon
<li>North Carolina
</ul>

The type of bullet can be changed to a "circle," "square" or "disc" by adding a specification within the <ul> tag:

<ul type="circle">
<li>California
<li>Oregon
<li>North Carolina
</ul>
<ul type="square">
<li>California
<li>Oregon
<li>North Carolina
</ul> 
Ordered List

An ordered list looks like this:

  1. oranges
  2. grapes
  3. cherries

An ordered list is a list of items in a logical, numbered order. Use the tags <ol> and </ol> to start and end this kind of list. Again, the <li> tag is used in front of each item.

Example:

<ol>
<li>oranges
<li>grapes
<li>cherries
</ol>

You can change the type of organization by adding a "type" designation within the <ol> tag.

<ol type="A"> orders the list by capital letters: (A, B, C...)

<ol type="a"> orders the list by small letters: (a, b, c...)

<ol type="I"> orders the list by Roman numerals: (I, II, III...)

<ol type="i"> orders the list by small Roman numerals: (i, ii, iii...)

If you would like to start your ordered list with a specified value, such as "6," use the following "start" and "value" tags:

<ol start=5>
<li value=6>
Descriptive Lists

A descriptive list creates a list of text items with an indented second line:

Marshall Brain
    Founder of HowStuffWorks 

Use the following tags in this manner:

<dl>
<dt>Marshall Brain
<dd>Founder of HowStuffWorks
</dl> 

The <dt> tag should correspond with the text you want lined up on the margin; <dd> corresponds with the line you want indented.

In the next section we'll find out how to link to other sites.