Meta Tags Tutorial part 2

When Should I Use HTTP-EQUIV?

If you write your page using a foreign alphabet, you need to tell the browser which character set to use. To see the list of choices, in Netscape there is a Character Set submenu under the View menu. Most of the sets are ISO standards, and they require you to have the proper font file installed on your computer. Big5, one of the Chinese fonts, needs special software as well.

If you are using a foreign alphabet, you already know all of this. You probably have a special HTML editor or at least a non-English version of a browser, and maybe even a customized Win95. Many languages use the Latin alphabet, so just because you don't write in English doesn't mean you need a different character set.

But I Do Write In English!

Even though you have a "normal" web page, you should still specify which character set you are using. The way you do this is:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
First you tell the browser what HTTP command you are supplying, in this case "Content-Type". Next, the CONTENT keyword says this is an HTML text file, and the character set is "iso-8859-1" (also known as Latin-1).

If you would like see an example of a different character set, go to this help page written in Turkish. You can view the source to see how the author declared the character set.

Other Useful Options

Content-Language

While Content-Type tells what alphabet (font) to use for the page's contents, Content-Language states what language the page is written in. This is used by search robots to categorize pages by language, and does not affect the display in any way. (I prefer to specify the language with the DOCTYPE tag.) Here is an example:
<META HTTP-EQUIV="Content-Language" CONTENT="en-GB">
which says the page is written in British English.

Refresh

You have probably visited a site where you saw a page saying something like "This site has been moved elsewhere", then you automatically went to the new address. That may have been done with the Refresh option like this:
<META HTTP-EQUIV="Refresh" CONTENT="delay;URL=URL">
where delay is the number of seconds to wait, and URL is the page to load. Again, I prefer to do this with JavaScript which lets me load the second page only if certain conditions are met. Make sure you put an HREF on the first page in case the Refresh (or JavaScript) doesn't work, to allow the viewer to manually proceed to the new page.

NOTE: GeoCities rules prohibit the use of this command to transfer to a page outside of GeoCities.

Window-target

Window-target tells what window to load the current page into. Normally, you will use the TARGET keyword in an HREF link. However, it is a good idea to make sure a frameset is never accidentally loaded inside of another frameset, as shown in this example:
<META HTTP-EQUIV="Window-target" CONTENT="_top">
Since this command is not recognized by all browsers, once again I prefer to use the equivalent JavaScript command.
Back to Meta Intro   On to Special NAME Tags >  
1