Solved

<Head> Tags

Posted on 2001-09-05
10
233 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
 
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
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 …
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now