Copyright Michael Karbo, Denmark, Europe.

  • Next chapter.
  • Previous chapter.

    Chapter 31. META tags

    I have previously mentioned that all HTML documents are organized in a HEAD- and a BODY-section. Even though the majority of the work making home pages is in the BODY section where all the contents are written, it is also good to know a little about the HEAD section’s function.

    The HEAD section contains codes hat are read by the browser before showing the graphics in the browser window.

    In the exercises in this book you have used templates from which to make new home pages. If you look at the template2.htm template, you can see that it contains a HEAD section:

    You have already tried to enter data in the TITLE code. That results in the text you see in the browser window’s title bar. But what is the rest used for? Let me give a couple of examples of that.

    Redirecting to new page

    First a little trick that I wish more people were aware of. Who has not tried to look for a given website only to find that it has moved to a new address. You can make the HTML document find the new address by itself! Remember that if you move your pages. Try this:

    1.   Use one of the templates to make a new home page.

    2.   Save it as karbossite.htm.

    3.   Enter this code in the document’s HEAD section:

    <META HTTP-EQUINV=Refresh CONTENT="0.01; URL=">

    4.   Save the document. If you are not already then go on the Internet.

    5.   Test the home page in the browser. What happens? In a couple of seconds the home page for this book is read in!

    6.   You can modify the code that is highlighted below, so it opens another address or another HTML document:

    Figure 70. The HEAD section redirects the browser to another Internet address.

    For the benefit of the search engines

    The most widespread use of the HEAD section is to utilize the META codes. If you look at figure 16 you can see four META codes just below the TITLE code. The fourth is rather special, since it is only used when you need to redirect the page. But you can have much fun with the others.

    You have to remember that most people like visitors to their home pages. And if you have made a home page about a specific subject with common interest, then you would like many visitors. One of the best ways to generate lots of traffic is by registering the home page in the search engine's database.

    You can register your page in all the large search engines (like Google, Altavista, Yahoo, MSN etc.). When you have registered the page, the company robot will scan your page. And here you can help the search engine by entering information in the META codes. Undoubtedly the most important is the code META NAME="keywords". Here you can enter search words that you think identify your page.

    See the example in Figure 71. There the META codes loaded with information. I will not go in depth in this subject. There are books and pamphlets written about that.

    Figure 71. The HEAD section of my web site (

  • Next chapter.
  • Previous chapter.

  • HTML Tutorial Overview.

  • Get the files for this tutorial (opens in a new window)