wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes multiple HEAD, BODY and HTML tags okay? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "multiple HEAD, BODY and HTML tags okay?" Watch "multiple HEAD, BODY and HTML tags okay?" New topic

multiple HEAD, BODY and HTML tags okay?

paul wheaton

Joined: Dec 14, 1998
Posts: 20494

I've inherited some jsp code that generates html pages that have lots of HEAD, BODY and HTML tags. I always thought that any html page is supposed to have no more than one of each of these. Not so? Should I expect problems?

permaculture Wood Burning Stoves 2.0 - 4-DVD set
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
Rule of thumb is only one set of head tags, body tags etc. I have seen multiple tags, might give older browsers a headache....On microsoft site, they recommended two head tags for cache problems...so I guess it is doable, but not a great practice.
Peter den Haan
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Originally posted by Eric Pascarello:
On microsoft site, they recommended two head tags for cache problems...
Then it no longer satisfies the HTML DTD, and quite simply ceases to be HTML. IE may still display it, but there's no guarantee that any other user agent still will. Not that Microsoft would care.
- Peter
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340

agreed. IE may accept it but it is wrong, wrong, wrong.

Visit my download page
Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
Testing the output in Netsacpe naviagtor 4.7 will also help you see what is missing.
I had the same problem(accidently) and the netscape just displayed the blank page.
[ January 28, 2003: Message edited by: Balaji Loganathan ]

Spritle Software Blogs
I agree. Here's the link: http://aspose.com/file-tools
subject: multiple HEAD, BODY and HTML tags okay?
Similar Threads
How to copy HTML page content to clipborad
How the The WEB-INF/decorators.xml is linked to a jsp page made up of Struts Tags.
Is there any difference if we mentin the script tags inside the Head Tag and the body Tag :
Body Of Struts 1.0 html:submit
Post data.