Solved

<Head> Tags

Posted on 2001-09-05
10
239 Views
Last Modified: 2006-11-17
Hi All

Can a web page have more than one <Head></Head> tag set and if so will they all work?

Does it matter if they are above or below the <Body> tag set?

Thanks!

Gatsby
0
Comment
Question by:Gatsby
[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
  • 2
  • 2
  • 2
  • +3
10 Comments
 

Expert Comment

by:rcoody
ID: 6459120
I'm not sure about Netscape but in Internet Explorer it can have more than one <head></head> tag set and they will work.
I also tried putting one after the <body> tag and it worked too.
However, I would really recommend that you not make more than one, and that you put them after the <html> tag and before the <body> tag.
0
 

Expert Comment

by:rcoody
ID: 6459129
I thought it might help if I showed you what I tried:

<html>
 <head>
  <title>whatever the title is</title>
 </head>
<body>
<head>
<style>
<!--
a:hover {text-decoration=none}
//-->
</style>
</head>
<a href="www.experts-exchange.com">Experts-exchange</a>
</body>
</html>
Note that there are two <head></head> tag sets, and one is after the <body> tag.

0
 
LVL 17

Expert Comment

by:dorward
ID: 6459148
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!

 
LVL 2

Expert Comment

by:garfld
ID: 6459478
just want to point out that ie will do many things that it shouldn't - and you can use really sloppy code with ie and it will still work out.

in my opinion, you should make sure code works with netscape, which is more rigorous (and generally more correct and according to standards).
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6460360
What is the point of what you are trying to do? If you have some reason you think you need to build such an invalid structure let us know, and we'll give you the correct method.

Cd&
0
 

Expert Comment

by:d_maryan
ID: 6460990
I agree with Coboldimosaur, i cannot see any reason to do this, every target you want to reach you can do without playing with the tags like you want.

It seems you only want to know for the pure fun of it.

Explain yourself....(if you will)
0
 

Author Comment

by:Gatsby
ID: 6462583
Hi All

I want to put a Meta Tag in every page that tells bots not to pick up the site for search engines. I am planning to put this in an include statement that has my cache prevention and security check code in it.

Unfortuntately, I have inherited this site and it already has <Head> tags in the pages (and there are 100+ pages). So the net result is going to be 2 head tags...one in my include and one in the page itself.

This app will only be used in IE 5.5 and above so I don't have to worry about the gynmastics required for Netscape.

Any ideas would be appreciated.

Thanks!

Gatsby
0
 
LVL 17

Accepted Solution

by:
dorward earned 50 total points
ID: 6463117
So just include the META tags in the include and put it inside the HEAD.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6463765
Yeah why does the include have to have a head tag? As Dorward said just stick the include in the head with just the tags you need.

You may only have to support IE5.5 today, but there is no guarantee that the next browser version you upgrade to will continue to support invalid coding structures.

Cd&
0
 

Author Comment

by:Gatsby
ID: 6466011
duh!!

Thanks Doward...its always the little things you don't think of...

Gatsby
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

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

Suggested Solutions

Find out what you should include to make the best professional email signature for your organization.
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?
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

726 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