HTML
HTML introduction
HTML basics
HTML colors
HTML backgrounds
HTML text
HTML font
HTML text formatting
HTML entities
Display tags
HTML links
Email links
Types of links
HTML images
HTML image maps
HTML tables
HTML frames
HTML forms
Fieldset/legend tags
HTML stylesheets
Div/span tags
HTML layout
HTML marquees
HTML multimedia
HTML meta tags
HTML document types
HTML base tag
HTML scripts
URL formatting
Encoding and decoding
HTML summary

Programming

Programming intro
Java

Markup

First webpage guide
XHTML

Style & Layout

CSS

Browser scripting

Javascript
VBScript
AJAX

Server scripting

PHP
ASP

Making money online

Make money online

HTML meta tags

So webpages have data, but how do we describe that data? A description of the data on a webpage may often be important for search engines as well as for users.

This lesson focuses on:


The <meta> tag

The <meta> tag is one of the most important tags in HTML. The <meta> tag is used to describe the page in some way as well as other things such as refreshing a page automatically after a certain amount of time, and preventing webpages from being displayed in another websites frames page. Some of the things that can be described using the <meta> tag include the pages author, the software used to create the page, and a description of the content on the page.

NOTE: The <meta> tag goes in the head section of an HTML document and has no end tag.

Attributes of the <meta> tag:

Examples of the <meta> tag utilizing the name and content attributes

Offering keywords to search engines that can be used in their searches:

<meta name="keywords" content="apple, orange, fruit" />

Offering a description of a webpage to search engines:

<meta name="description" content="A fruit store for all! 
whether you prefer pears, oranges, grapes, or any other fruit, 
we have something for everyone!" />

Telling search engines what software was used to create a webpage:

<meta name="generator" content="Notepad" />

Telling search engines who created a webpage:

<meta name="author" content="Someone A. Person" />

Telling search engines when to expire a webpage in their databases:

<meta name="expires" content="February 1st, 2876" />

Examples of the <meta> tag utilizing the http-equiv and content attributes

Reloading the current page every five seconds:

<meta http-equiv="refresh" content="5" />

Preventing a webpage from being viewed inside some other websites frames page:

<meta http-equiv="window-target" content="_top" />

Examples

Page author
This example demonstrates declaring who is the author of a webpage.

Page description
This example demonstrates declaring a description for a webpage.

Page expiration
This example demonstrates declaring an expiration date for a webpage to be used by search engines.

Page generator
This example demonstrates specifying the software that was used to create a webpage.

See more meta tag examples

Practice

Online code editor
Practical examples
Practical exercises
Step-by-step tutorials

Reference

Terms glossary
Reference material

Rate this site

Rate this site
Visitor comments