?
Solved

<Head> Tags

Posted on 2001-09-05
10
Medium Priority
?
259 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
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 200 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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Suggested Courses

862 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