Meta name and content

Section 1 - Introduction
Section 2 - Basics
Section 3 - Next Level
      Lists
      Basic Tables
      Advanced Text
      Marquee
      Meta
         Name and content
         Refresh or forward
         Keywords and description
         Once upon a time...
         You Try It!
      Sounds
      Comments
Section 4 - Advanced
Section 5 - Publishing
Section 6 - Extras
Appendices
As previously mentioned, meta tags go in the head of the document. That makes them dull to look at, but often very useful. This first meta tag you will learn can tell browsers what your page is about.

Suppose a search engine wanted to display a blurb about your page. Most search engines will display the first couple lines of text. You can tell the browser or engine exactly what you want it to say. This is done with a meta tag.

The easiest way to explain this is to show you a tag and then dissect the parts. Here goes:
<html>
<head>
<title>This is the title</title>
<meta name="description" content="A tutorial of how to use meta tags in HTML. Designed for independent study in middle schools.">
</head>
All of this takes place in the head of the document. The elements should all be familiar to you except the "meta" tag. Here, you'll notice two parts to the meta tag. First, there is the name. If you were going to describe a vehicle, you could say:
name="school bus" content="large, yellow and slow. Many seats and one driver. Holds students and their backpacks.
Putting a description of a schoolbus on your site may be fun, but it won't be useful at all. The description of your page is much more useful.This should be short, accurate and to the point. It may also be useful to add a meta tag to put the author and date on your page. That could look like:
<meta name="Author" content="Debra Lowe, 2005">
You can add as many meta tags as you'd like, but don't get carried away. Notice that there is no </meta> tag.
Back Home Forward