The Meta Tag
Meta Tag
Meta Tag Definition (from W3C)
- The META element can be used to include name/value pairs describing properties of the document, such as author, expiry date, a list of key words etc. The NAME attribute specifies the property name while the CONTENT attribute specifies the property value, e.g.
- < NAME="Author" CONTENT="Dave Raggett">
- The HTTP-EQUIV attribute can be used in place of the NAME attribute and has a special significance when documents are retrieved via the Hypertext Transfer Protocol (HTTP). HTTP servers may use the property name specified by the HTTP-EQUIV attribute to create an RFC 822 style header in the HTTP response. This can't be used to set certain HTTP headers though, see the HTTP specification for details.
- < HTTP-EQUIV="Expires" CONTENT="Tue, 20 Aug 1996 14:25:27 GMT">
- will result in the HTTP header:
- Expires: Tue, 20 Aug 1996 14:25:27 GMT
- This can be used by caches to determine when to fetch a fresh copy of the associated document.
Meta Tag Example
- Typical HTML page generated by Frontpage
- < http-equiv="Content-Type
- content="text/html; charset=iso-8859-1">
- < name="GENERATOR" content="Microsoft FrontPage 2.0">
- < name="FORMATTER" content="Microsoft FrontPage 2.0">
Meta tag with http-equiv
- Any http tag can be specified using meta tag, but not many very useful.
- Dont use in cgi scripts - specify http header directly.
- Preventing pages which may changed from being cached
- < http-equiv=Expires content=Tue, 20 Aug 1996 14:25:27 GMT>
- Redirection of obsolete HTML pages.
- < http-equiv="Refresh" content="2; url=new.html>
- Use with frames:
- < HTTP-EQUIV="Window-target" CONTENT="_top">
- Beware: All uses non-standard and subject to browser/server capabilities.
Meta Tags with Search Engines
- Some search engines (Alta Vista, Infoseek, Harvest?) support the use of Meta tags: e.g.
- < NAME="description" CONTENT="Demonstrations Of Advanced HTML">
- < NAME="keywords" CONTENT="HTML,Advanced,Search,Floating Frames">
- < NAME="robots" CONTENT=noindex,nofollow>
- Because these tags are non standard and widely abused some search engines ignore them totally, and others will ignore them if, for example, they contain many or repeated keywords.
References
- HTML 3.2 reference at w3c
- http://www.w3.org/TR/REC-html32.html#meta
- Advanced HTML
- http://www.dananeda.demon.co.uk/html/advancedhtml.htm#Meta
- Info on META tag (detailed)
- http://vancouver-webpages.com/META/