This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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
Author

multiple HEAD, BODY and HTML tags okay?

paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20484
    ∞

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
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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
author
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
    
    2

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


SCJP
Visit my download page
Balaji Loganathan
author and deputy
Bartender

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 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.
How to copy HTML page content to clipborad