• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

Meta tag and Attributes

Explain The Attributes used like Name,Content,Generator etc; in a Detailed manner. (ie.With Examples).
0
pamboo
Asked:
pamboo
1 Solution
 
VitenkaCommented:
Whew! Tall order!

None of those tags actually do anything, with the exception of 'content-type'

<META NAME=Generator CONTENT="HTMLpad v1.1 (c) DRaX">
META - means this isn't really a tag, it's information about the document.
NAME=xxx means that xx is actually the tag (and that if the browser knows about xxx tags it should treat the line as if it read <XXX CONTENT=".....">

Now, the CONTENT field gives all the other attributes for the tag.

So, an example set of META tags might be...
      <META NAME="AUTHOR" CONTENT="Vitenka (Adam Brunning)">
      <META NAME="KEYWORDS" CONTENT="Animus Silvae, Animus">
      <META NAME="DESCRIPTION" CONTENT="Welcome to the...">
      <META HTTP-EQUIV="Refresh" CONTENT="5; URL=main.htm">

Now, the first three tags are, essentially, meaningless.
Some web cruising, or management, software might use them - but otherwise they are basically comments; and could proabably be written as such.
The 'Keywords' and 'description' contents are used by search engines (primarily) and should match the contents of the page - or they will be discarded.

Now for the interesting one.
HTTP-EQUIV means that the tag shopuld be parsed as though it had appeared in the HTTP header to the document; ie. the bit CGI manipulates, and which can contain froody information.
You can put redirect, content-type, title and other such information in there - but you probably shouldn't.
The useful one is that 'refresh' one - which is what allows a page to force load another, after a set time period.

The format is as given -
<META HTTP-EQUIV="Refresh" CONTENT="5; URL=main.htm">
Just 'Refresh' as the http header equivalent; the content should be the time (in seconds) before a refresh) and (optionally) a semicolon, and then the next URL to load.
If no URL is given, then the same page loads again.

K?

0
 
th_c_manCommented:
Vitenka...

About this refresh thing...

If i had a directory called directoryl and i didnt want people to see all the stuff in the directory (say if it where my scripts and stuff were), id put a page there called directory/index.html and in the header put

<META HTTP-EQUIV="Refresh" CONTENT="1, URL=/page.html">

where page.html is a page they are allowed to see in a directory they are allowed to access?

If so this is cool, because i was about to post the question about how to do that myself but i saw this one, an thought id read this first. Lucky i did!!


Thanx
Daniel
0
 
pambooAuthor Commented:
well thank you.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mouattsCommented:
Vitenka is correct in his description on the META tags with one important exception.

The Meta tags are designed not for the browsers use but the Web Servers. When a server receives a request for a document the web server will parse the head section of the page and for HTTP-EQUIV tags issue the appropriate HTTP header. It is this HTTP header that the browser uses not the content of the Meta tag.

According to the HTTP spec there is no requirement for a browser to understand the META tags.

Incidentally the refresh idea to avoid people seeing the contents of a directory will appear to work but is not the correct way of protecting a directory. To implement this you should turn directory indexing off for that directory and/or make the directory inaccessible to the server.


0
 
Answers2000Commented:
This is a dictionary of meta tags
http://vancouver-webpages.com/META/

If you need a program to help create meta tags, try Tag Gen
http://tracker.clicktrade.com/tracker/tracker.dll?to='http://www.taggen.com/taggen.htm'&ad=98858.0&lp=104476
0
 
neelam_sCommented:
The <head>may hold a number of different elements,including:
*<title>   Describes the document'sname.
*<base>  The original URL of the document
* <Meta>  Embeds any additional information

Only the title element is required .Rest are optionaland often do not appear in basic HTNL constructions.
With meta tag you can present your web search engine(like yahoo)with keywords and a description of your content.This makes your page easier to find for  people who have similar interests.
In meta tag it is must to include content attribute as well as either the name or http-equiv attriubute --but never both.
<meta> can be use to automatically load new web pages .
eg.
<meta name="description"   content="write your description here">
The meta tag is used by robots to describe your site in web directory's listing.

Here next eg. is ,which refresh your current page after waiting 10 seconds.
<head>
<meta http-equiv="refresh" content="10">
</head>

In this eg. we will use client pull to load a new page after waiting 15 seconds.

<head>
<meta http-equiv="refresh" content="15"; url=http://www.mynet.com/index.html">
</head>


So you can go to other page automatically after 15 sec. without clicking any where.

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now