HTML | PHP | Forum

HTML <meta> tag



Contained in <head>

Definition and Usage

The META element provides metadata such as a document's keywords, description, and author. Any number of META elements may be contained in the <head> of a document.

META's NAME attribute provides a property name while the CONTENT attribute gives the corresponding value. The CONTENT attribute value may contain text and entities, but it may not contain HTML tags.

The optional SCHEME attribute gives the format of the property value. For example, a date property may require SCHEME="Month-Day-Year" to disambiguate the date from other formats such as SCHEME="Day-Month-Year".

There is no standard list of META properties, so authors may define whatever metadata they like.

Some search engines use keywords and description properties, giving extra weight to a document's keywords and providing its description with the link to the document.

To avoid being truncated by search engines, the description should be brief--no more than 200 characters. Keywords are separated by commas and may be considered case sensitive by search engines.

Required Attributes

Attribute Value Description
content text Defines meta information to be associated with http-equiv or name

Optional Attributes

Attribute Value Description
http-equiv content-type
Connects the content attribute to an HTTP header
name author
Connects the content attribute to a name
scheme text Defines a format to be used to interpret the value of the content attribute (like a date)

Standard Attributes

dir, lang, xml:lang

For a full description, go to Standard Attributes.


Source Output
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title>HTML reference guide</title>
<meta name="description" content="Complete HTML reference guide." >
<meta name="keywords" content="html,guide,reference,tags">
<meta name="author" content="sunilcare">
<meta name="reply-to" content="">
<META NAME="robots" CONTENT="index,follow,all">
<LINK REL="stylesheet" HREF="/mystyle.css">



Learn HTML
HTML Tutorial

HTML Reference
HTML by function
HTML by Alphabet

HTML events
HTML attributes
HTML color names

<h1> to <h6>


Copyright 2005-8 Sunilcare.  All Rights Reserved.
Comments or suggestions? Contact us.About us