This site has been taken over by the staff of www.ASPDeveloper.Net

Please report errors to suggest@aspdeveloper.net

BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
XHTML
The XHTML <menu> Tag
The XHTML <map> Tag
The XHTML <link> Tag
The XHTML <li> Tag
The XHTML <legend> Tag
The XHTML <label> Tag
The XHTML <ins> Tag
The XHTML <input> Tag
The XHTML <img> Tag
The XHTML <iframe> Tag
The XHTML <html> Tag
The XHTML <hr> Tag
The XHTML <head> Tag
The XHTML <h1_h6> Tag
The XHTML <frameset> Tag
The XHTML <frame> Tag
The XHTML <form> Tag
The XHTML <font_style_tags> Tag
The XHTML <font> Tag
The XHTML <fieldset> Tag
<< XALAN
XML DOM >>

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :03/24/2008
Times viewed :5321

 

The <meta> Tag (XHTML Reference)

Introduction

The <meta> tag is one of the important tags if you want your website to be quickly findable in search engines. It can also include information about the author and the content of the page. However they can also process http commands, for example a redirection to another webpage. Note that this tag is not meant to create any comments about the page or something like that. If you need to write down comments on your page, take a look at the <!-- --> comment tag. You can use many meta tags as you like in one page and it is usually defined in the head tag.

Example

<head>
<meta name="author" content="Sonu Kapoor" />

<meta http-equiv="expires" content="Mon, 30 July 2006 11:59:59 GMT" />

</head>

Each meta tag has two attributes. The first attribute is the name or http-equiv and the second one is always content. The value of “name” is bound with the value of the “content”. In the above example I have used value of name as “author” and the value of content to “Sonu Kapoor”. That simply means that the author of the page and content is Sonu Kapoor. In the second meta tag I am using the http-equiv attribute with the value “expires”. The difference between the “name” attribute and the “http-equiv” attribute is that the value of http-equiv can be read by a web-server and the value in “name” is only relevant for search-machines or robots. Here are few more examples:

Attributes

Name:

Description:

name

The name attribute can contain the following values:

Description: Used to define the description of the page. The value of content can be a one or two line description.

Keywords: Used to define the keywords for search engines. The value of content can be a list of comma-separated keywords. In conjunction to that you can also use the lang (language) attribute with the language code (en-us, en-uk, it, fr etc. ) as value to define the keywords in other languages.

Date: Used to define the publication date of the page. The value of content should be the Date/Time format and the UTC also known as GMT or Greenwich mean time. Here is a short example: 2004-08-06T09:59:17+00:00. If you want to use only the date, then you can just use the part before the “T” (Time).

Revised: Used to define the last revision of the page. The value of the content can be a name with a date.

Robots: Used to define whether robots also known as search engines should be able to find this page or not. The value of content can be “noindex” which means that you are forbid search engines to read the content of the page. On the other hand the “index” value strictly allows the search engine to read the content. The value “nofollow” means that you are forbidding search engines to read also the sub directories of your website, which can contain sensitive files. The value “follow” allows the engine the also read sub directories.

http-equiv

The http-equiv can have one of the following values:

Content-Type: Used to define the content-type of the file. In the content value you can then specify the file type – for xhtml/html files this value is “text/html”.

Content-Script-Type: This value works the same as the “Content-Type” with the difference that it is used to define the scripting language of the page. The value of content can be text/javascript for a javascript page, text/css for your style sheet or any other.

Expires: The “expires” value is used to clear the cache at a specific time. The content value can be either a date/time as shown in the above example or you can set it to 0 to read always from the server instead from the cache.

Refresh: The refresh value can be used to redirect a user to another page. The value of content can be a URL or a page. You also have to define the seconds in which the redirection should occur. Here is an example:

<meta http-equiv="refresh" content="5; URL=http://www.topxml.com/">


Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

Software Specialist, Linux - Finlan
Linux Core Technical Project Manage
Graphics designer at Tanzania. Expe
Integration Specialist Needed - Wor
Virtualization Server Infrastructur

View all Jobs (Add yours)
View all CV (Add yours)






    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP