?
Solved

Meta tag and Attributes

Posted on 1998-11-20
6
Medium Priority
?
251 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
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

Industry Leaders: 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!

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
Suggested Courses

765 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