| Basics | Headings | Formatting | Font Tags | Font Styles | Lines | Links | Lists | Images | Tables | SSI | Frames | Glossary |

Tags


HTML Tags

HTML describes the structure of your document in a way that will be portable from one machine to another (IBM, Mac, Unix, etc.). Tags are used to surround the commands so the computer can recognize them. Typically, there are two similar commands. One for starting a command and another for ending the command.

Starting commands are enclosed within less-than and greater-than signs <command>. Ending commands are enclosed with less-than and greater-than signs with a / directly following the less-than sign </command>. There are some commands that do not need an accompanying ending command. A sample tag to bold face some text would look like this:

                          <b>text displayed</b>


Basics of the document

Every HTML document should contain these four elements.

HTML

The HTML tags tell the computer that the document is an HTML document. HTML documents should begin with <html> and end with </html>.

HEAD

HEAD tags are for the header of the document. The head typically contains the title of the document. [other head elements]

TITLE

TITLE tags tell the browser displaying the document that this is the title of the document. It is not always the same as the file name.

BODY

The BODY tags enclose the main part of the document. Any text, links, pictures, etc., should be enclosed within the body tags. [other body elements]

A page should always start off looking similar to this at the very first. These tags all have starting and ending commands. The alignment on the left side is not necessary. (It is just entered that way here to help identify the corresponding commands.)

          <html>
               <head>
                    <title>
                         Title of document goes here
                    </title>
               </head>
               <body>
                    Body of document (this is what shows up on the page)
               </body>
          </html>


Head Options

<title>

specifies the title of the current document

<link>

lets the document specify a common root link address

Body Options

Text Colors

From the browser there are four defined colors of text for each document. Most pages do not deviate from the defaults, but how to change them is discussed briefly below.

          <body text=# link=# alink=# vlink=#>
textcolor in which the main body of text is displayed
linkcolor in which un-visited links are displayed
alinkcolor in which active links are displayed (currently selected)
vlinkcolor for a link that has been visited (been there, done that)
# =rrggbb # stands for the color number. The number is defined for the values for rr (red), gg (green), and bb (blue). The numbers must be displayed in hexadecimal (base 16) values which include: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f.
range would be from 00-ff or (0-255 base 10) for each of the rr-gg-bb.

Red would be ff0000 or max red, no green and no blue
Green would be 00ff00 or no red, max green and no blue
Blue would be 0000ff or no red, no green and max blue

Now, I will be the first to admit that I'm not an expert on color schemes, but if you are going to change these options --- pick some colors that are readable and complement each other. Browsers have a few colors defined for standard use, but you can generate any color you want (if you can find the right numbers).

Backgrounds

colors
and
images

There are also two options that can be changed in the background.

bgcolor changes the background to a solid color

background displays a tiled (keep them small) image over your entire screen (tiled means that the image is redrawn until the browser screen is full)
Do you want to see a bunch of peppers? This is a screen with a tiled peppers background.

     <body bgcolor=#>                # same as above in text colors
     <body background="image">    image is a file location for the picture


| Basics | Headings | Formatting | Font Tags | Font Styles | Lines | Links | Lists | Images | Tables | SSI | Frames | Glossary |

last modified February 01, 2006 53728