DannyL
02-15-2007, 05:17 PM
For as long as I've been validating web pages, I never realized that the closing </head> tag was optional in HTML. I feel as if I've missed the boat at times. ;)
While I'm all for trimming excess code, I just cannot for the life of me strip out closing tags because they are optional in HTML. I'd be concerned that something, somewhere would not parse the document correctly if I removed the closing </head> element.
Are my concerns unfounded?
the_pm
02-15-2007, 05:32 PM
It's a bad coding practice to leave tags unclosed. Don't do it, if for no other reason than it's a pain in the *** to work with code that's missing closing tags. Even if you're writing regular HTML, write it as if you want to produce XHTML (but without the self-closing tags).
gobeyond
02-16-2007, 10:31 PM
I agree with "the_pm", you need to have all the closing tags in place. This acutally help web browers in rendering your pages. You may or may not gain any speed, but certainly in theory, it is a good practice. They are not extra, but necessary.
drhowarddrfine
02-16-2007, 10:45 PM
If you really want to go crazy, you can leave out the html, head and body tags altogether. Both opening and closing are optional.
stridox
02-17-2007, 12:25 PM
It's a bad coding practice to leave tags unclosed. Don't do it, if for no other reason than it's a pain in the *** to work with code that's missing closing tags. Even if you're writing regular HTML, write it as if you want to produce XHTML (but without the self-closing tags).
I think you hit it on the nose
wedoxhtml
02-17-2007, 03:04 PM
Need to closed the tag properly.