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
Solved

<Head> Tags

Posted on 2001-09-05
10
238 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

 
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Title # Comments Views Activity
CSS: How do I override in-line styling 11 25
Else condition 9 23
html input 8 42
jQuery Dialog Autoresize Bug 2 25
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

856 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