HTML - meta tag

Here you learn how to code the META tag.

Common Uses of Meta Tags

Meta tags lets webmasters specify meta data - information about a document rather than document content - inside the HEAD tags. Most of the META information is structured in the "name=content" format where "name" identifies the property name and "content" specifies the property's value. This is done to give the search engines information about your site. There are 4 common pieces of information inserted into the meta tags:

  • 1. Defining the character set.
    The character set, defined by the "charset" attribute, identifies a character encoding, which is a method of converting the bytes into characters. Commonly used character encodings on the web include ISO-8859-1, Windows-1252, and UTF-8.

  • 2. Keyword information
    The "name=keywords" attribute communicates a list of keywords that are relevant to your page. Keywords are separated by commas and may be considered case sensitive by search engines.

  • 3. Content description information
    The "name=content" attribute communicates a description of the content on your page.

  • 4. Link to the CSS file.
    When a META tag refers to a seperate file, most webmasters prefer to specify the meta data via the LINK element. For example, the following Thus, the following meta data declaration:

    <meta name="stylesheet" content="/stylesheet.css">

    would be written:

    <link rel="stylesheet" type="text/plain" href="/stylesheet.css">

Although the META tags play a great role in SEO, this tutorial deals strictly with the syntax of the META tags and not with the SEO. If you want to learn more about how META tags relate to SEO then read our SEO section of this site.


Other Uses of Meta Tags

Some webmasters use the META tag for page-forwarding but instead of this you should use a server-side redirect. The META tag can be also be used to identify other properties of a document (for example: author, document expiration date, etc.) and assign values to those properties. Some search engines also support the robots attribute for indicating whether a document should be indexed by a search engine bot and whether its links should be followed. The following tag can be used to do that.

<META name=robots content="noindex,follow">

META tag

<html>
<head>
<title>HTML tutorial</title>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=keywords content="html tutorial, webmasters">
<meta name=description content="This site has webmaster tutorials on HTML.">
<link rel=stylesheet type="text/css" href="/stylesheet.css">
</head>

<body>
Content goes here.
</body>

</html>


 
Bookmark this page:
   
Rate this page:
  • Currently 2.95/5
  • 1
  • 2
  • 3
  • 4
  • 5

Rating: 3.0/5 (242 votes)



Comments:

please post comments
admin November 21, 2006

 
Nickname:
Comment:
Security: 1+1=
Hosts
Lunarpages.com Web Hosting
iPowerWeb

Domain Registrars
PPC Networks
Logos
Affiliate Networks
Resources