Meta tag in HTML

META tags description in NAME group:

Author

Author tag must contain the author's name. If the site belongs to some specific organization,it will be reasonable to use the "Copyright".

Examples:

<META Name=”Author” content=”James Brown”>
<META Name=”Copyright” content=”My Copyright”>
Description

Description META tag provides a brief html-page description. It is used by search engines for indexing and as a brief annotation in the response to a request alongside with link. And exactly the contents of this tag helps user of search engine to define whether your site corresponds to his query or doesn"t.

If Description tag is missing in the code, search engines use the first line of the text or text fragment with detected key word.

The preferable length of the description is not more than 80 characters.

Example:

<META Name=”Description” content= ”.. .”>
Document-state

Document-state META tag - is designed to control the indexing of search robots. It can take on one of two values:

Static - if there is no need to index this page in the future.

Dynamic - for regular indexing (by default).

Mode "Static" is intended for pages that do not change in principle. If the content of your page changes from time to time, then usage of this tag is optional.

Example:

<META Name=”Document-state” content =”Dynamic”>
Generator

Generator META tag- is just one of the "nice" family of tags that are widely used by HTML code generators for their own purposes. Typically these tags do not carry any the payload for a site owner.

Keywords

Keywords META tag is used by search engines for relevance assessing. The words contained in Keywords tag, are considered by search engines as a recommendation. Creating a keyword list for Keywords META tag you should use the words contained in the text. Words that are not contained in the text can be used in very small quantities, two or three words. They must be embedded in the end of the list. Key words should not be repeated in the Keywords tag, in extreme cases, not more than twice. In the Keywords META tag is reasonable to use no more than 10 words, a larger number will not increase relevancy. In most cases search engines find plural keywords (e.g., cats), even if the search is set for the singular word (e.g., cat). That is why it"s recommended to input English plural nouns in Keywords META tag. Some search engine robots do not move to a new line during the Keywords META tag analysis, therefore, it"s not advisable to break it into several lines.

Example:

<META Name=”Keywords” content=”primer, META, tega”>
If the document is written in several languages, you can use the extra "lang" attribute for encoding selection (see description of Content-Language META tag).

Example:

<META Name=”Keywords” lang=”ru” content=”META tag example”>
<META Name=”Keywords” lang=”en-us” content=”META tag example”>
But more preferable is making separate pages, each for one language, with switching from one to another, using the tag <A> and <Link>.

Resource-type

Resource-type META tag - describes the state of the current document. If its the value differs from the "Document", then search engines will not index it. This META tag is designed for use in large projects with many different types of documents.

Some possible values are:

* Build

* Classification

* Creation

* Document - accept the default.

* Formatter

* Host

* Operator

* Random text

* Rating

* Site-languages

* Subject

* Template

* Version

Example:

<META Name=”Resource-typecontent =”Document”>
Revisit

Revisit META tag - shows to search engine, in how many days he needs to return to reindex this document.

Example (to come once a week):

<META Name=”Revisit” content=7”>
Robots

Robots META tag contains guidance for the search engines robots that collect information about HTML documents in the network. Value of Robots feature can consist of the following directives, separated by commas:

* Index - this page should be indexed.

* Noindex - this page should not be indexed.

* Follow - to track the hyperlinks on the page.

* Nofollow - no tracking hyperlinks on the page.

* All - = index, follow (set by default).

* None - = noindex, nofollow.

Tag <META name=Robots content="all"> does not change anything in the search engine robot, as well as the importance of "all" is set by default.

But if the page is created dynamically or is updated very often, there is no point in its indexing, as well as information about a page in the search engine and its real content will be different. In this case you can recommend the search engine not to index this page, and only to monitor hyperlinks to index the rest of the site

Example:

<META name=Robots content=”noindex,follow”>
Using the tag that prohibits the tracking of hyperlinks <META name=Robots content="index,nofollow"> some part of the site may not be indexed, because inside of the site the robot move along hyperlinks. And pages with blocked transitions will not be indexed.

Robots META tag takes precedence over the directives of management defined in the file robots.txt.

Subject

META tag Subject used by search engines to determine subject matter of the document. But until the search engines do not agree their classification tables, the use of this tag is not always justified.

URL

META tag URL - is intended for excluding the generated pages and mirrors from indexing. Met this tag, the search engine robot must stop indexing of the current document and click on the specified link.

Example:

<META Name=”URL” content= “http://www.Main-Site.com”>
Description of META Tag of HTTP-EQUIV group:
Content-Language

Content-Language META tag- it is an indication of the document language. Used by search engines when indexing. Although most of them are able to distinguish the language by the text.

Some possible values (standard [ISO639], [ISO3166]):

de - German

el - Greek

en - English

en-GB - English - United Kingdom

en-US - English, American version

en-cockney - English, cockney dialect

es - Spanish

fr - French

it - Italian

i-navajo - Navajo (North America)

ja - Japanese

he - Hebrew

nl - Dutch

ru - Russian

pt - Portuguese

x-klingon - Code "x" denotes the experimental language code

zh - Chinese

Example:

<META HTTP-EQUIV=”Content-languagecontent =”ru”>
In the HTML 4.0 specification there is an alternative possibility of an explicit indication of the language - <html lang="en">

Content-Script-Type

META tag Content-Script-Type - Definition of the programming language scripts.

Some of the possible values: text / javascript

text / perlscript

text / tcl

text / vbscript - JavaScript (set the default).

- PerlScript.

- TCL.

- VBScript.

Example:

<META HTTP-EQUIV=”Content-Script-Typecontent=text/javascript”>
If the Content-Script-Type tag is not used, the type of programming language for the scripts that differs from that set by default, must be specified directly in each <SCRIPT> tag, sample <SCRIPT type="text/javascript">.

Content-Style-Type

META tag Content-Style-Type - indicates stylesheet language, "text / css" value is adopted by default. If you are satisfied with it and you don"t use <Style> and <Span> tags in the document, then the usage of this tag is optional.

Example:

<META HTTP-EQUIV=”Content-Style-Typecontent=text/css”>
Content-Type

Content-Type META tag - is responsible for document type indication and symbol coding.

Usage of Content-Type META tag has some nuances:

* Firstly, the symbol coding of the text should correspond to the coding specified in the tag.

* Secondly, the server should not change the text coding during the query processing in the browser.

* Thirdly, if the server changes the text coding, it must adjust or remove Content-Type META tag.

Attention!

Content-Type META tag is often inserted by HTML code generators.

Windows-1251 - Cyrillic (Windows)

KOI8-r - Cyrillic (KOI8-R)

cp866 - Cyrillic (DOS)

Windows-1252 - Western Europe (Windows)

Windows-1250 - Central Europe (Windows)

Example:

<META HTTP-EQUIV=”Content-Typecontent=text/html; charset=windows-1251?>
Expires

Expires META Tags - manages the cache. If the date specified in the tag has passed, the browser must make a recurring network request, and not use the copy from the cache. If the past date is initially set, the document will not be cached.

Some search robots may not index the document with obsolete date.

Date should be specified in the standard [RFC850].

Example:

<META HTTP-EQUIV=”Expires” content=”Wed, 26 Feb 1999 08:21:57 GMT”>
PICS-Label

PICS-Label META tag - (Platform-Independent Content rating Scheme Label)) determines the level of site accessibility (sex, violence), but it can be used for other purposes.

Pragma

Pragma - is the caching control. A value of "no-cache" caching is not recommended. This META tag is designed for the documents received as a result of the script work.

Example:

<META HTTP-EQUIV=”Pragma” content =”no-cache”>
Refresh

Refresh META Tag - the definition of delay time in seconds, after which the browser automatically updates the document. Additional feature - the automatic downloading of another document.

Example:

<META HTTP-EQUIV=”Refresh” content =4; URL=http://www.name.com/”>
If you just need to update the document, the URL assignment is not required.

Set-Cookie

Set-Cookie - Install a browser cookie.

Example:

<META HTTP-EQUIV=”Set-Cookie” content=NAME=value; EXPIRES= date; DOMAIN=domain_name; PATH=path; SECURE”>
Attributes EXPIRES, DOMAIN, PATH and SECURE can be deleted if not needed.

Example:

<META HTTP-EQUIV=”Set-Cookie” content=NAME=value;”> NAME
The name cookie, can not contain the line feed characters, spaces, a semicolon (;) and Tab.

EXPIRES

Storage Time for cookie. After this date (in the format "Wdy, DD-Mon-YYYY HH: MM: SS GMT") the time of cookie storage expires.
If this attribute is not specified, the cookie is stored during one session, before closing the browser.

DOMAIN

The domain for which the cookie is set. For domains COM, EDU, NET, ORG, GOV, MIL, INT the value can be abbreviated as "MY.COM", it is identical to "WWW.MY.COM". For all the rest (including RU) value must be set fully "WWW.MY.RU".
If this attribute is omitted, the default domain name server, which was billed meaning cookie.

PATH

Installs a subset of documents to which the cookie. When the value "/ doc" the cookie will be distributed to all files and directories in that directory starting at the "doc" (/ doc /, / document /, / doc2 /, docs.html, doc-test.htm).
If this attribute is omitted, the value of cookie covers only the documents of the folder that contains the current document.

SECURE

Indicates that the information about the cookie should be sent via HTTPS (HTTP with using SSL). Otherwise, the information about the cookie will be sent over HTTP.
Before making a request to the server, the browser checks the cookie. And if the NAME, DOMAIN and PATH attributes match, the browser sends cookie to server.
If a cookie takes the new value, old value is removed.
Browser has a number of restrictions in terms of working with the cookie:
Up to 300 values cookie can be stored at a time.
Cookie can not exceed 4 KB.
There can be not more than 20 cookies from one server(domain).
These restrictions may slightly differ depending on the configuration and the type of browser.
When an excess of the limit (general or by domain) takes place, the oldest record is deleted. Removal takes place regardless of the attribute EXPIRES value.
When exceeding 4 Kbytes, cookie is truncated.

Example:

<META HTTP-EQUIV = “Set-Cookie” content =NAME = cookexample; EXPIRES = Monday, 22-FEB-02 21:11:51 GMT; DOMAIN = WWW.MY.RU; PATH = /; SECURE” >
Window-target

META Tag Window-target - specifies a window of current page. This will be used to stop the emergence of new browser windows in the application for frame structures. It is fair for many (but not all) browsers.

Example:

<META HTTP-EQUIV=”Window-targetcontent =”_top”>
HTML Style
Tables in HTML
Color Codes in HTML
HTML Forms