1. Computing & Technology

Discuss in my forum

How to Add Meta Tags to Web Pages

By , About.com Guide

See More About:

Meta tags can help with search engine optimization and cataloging your web pages. But only if you add the meta tags correctly. It's easy to add new meta tags to your web pages. This article will show you how.

Difficulty: Easy
Time Required: 5 minutes

Here's How:

  1. First, open your HTML document in a web page editor. It doesn't have to be a text editor, but if it isn't you'll need to know how to open the HEAD of your pages in the editor.

  2. Place your cursor inside the <head> tag. You can place your meta tags anywhere inside the HEAD tag, but most people put them after the TITLE and before any CSS or scripts.

  3. Type:

    <meta name="description" content="
  4. Then type the description of your web page. This should be no more than 400 characters long and describe the content of this web page, specifically.

  5. Continue with:

    ">

    If you are writing an XHTML page, you'll need to include a trailing slash (/) before the final greater-than sign (>). For example:

    " />
  6. Add any other meta tags in the same way. Start with the opening <meta, indicate the type of tag it is: name="" or http-equiv="", enclose the contents of the meta tag in quotes: content="", and close the whole tag: > or / >.

Tips:

  1. I like to keep each meta tag on a separate line, so that they are easier to read. But if you are concerned with space, they can be all on one line.

  2. Don't forget to enclose the attributes in quotation marks.

  3. And if you're writing XHTML, don't forget the closing slash (/).

What You Need

  • HTML editor

©2012 About.com. All rights reserved.

A part of The New York Times Company.