Solved

Meta tag and Attributes

Posted on 1998-11-20
6
245 Views
Last Modified: 2013-11-19
Explain The Attributes used like Name,Content,Generator etc; in a Detailed manner. (ie.With Examples).
0
Comment
Question by:pamboo
6 Comments
 

Expert Comment

by:Vitenka
ID: 1839926
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
 

Expert Comment

by:th_c_man
ID: 1839927
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
 
LVL 3

Author Comment

by:pamboo
ID: 1839928
well thank you.
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 11

Expert Comment

by:mouatts
ID: 1839929
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
 
LVL 8

Expert Comment

by:Answers2000
ID: 1839930
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
 

Accepted Solution

by:
neelam_s earned 0 total points
ID: 1839931
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses how to create an extensible mechanism for linked drop downs.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question