Add your website to the Xemion web designer directory and gain highly-targeted traffic and new leads.
| Post Reply |
|
|
Thread Tools |
|
#1
July 7, 2007
-
Junior Member,
2 posts
|
|
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? |
|
#2
September 21, 2007
-
Junior Member,
2 posts
|
|
when you validate a page without </head> at: http://validator.w3.org/ it will generate an error.
cloo
Quote
|
|
#3
December 23, 2007
-
Junior Member,
9 posts
|
|
It will work without it in a browser, but it is still incorrect. Some browsers would probably display properly with just the <html></html> tags and no <head> or <body>.
|
|
#4
December 23, 2007
-
Junior Member,
18 posts
|
|
Don't strip out </head>, </body> or </html> closing tags - it may hurt compatibility and you end up with a site that won't load.
|
|
#5
December 23, 2007
-
Junior Member,
6 posts
|
|
It depends on how the browser parses the source code. I would think it's a very good idea to close all your tags, since XHTML requires that you do so.
If you want your code validated, you do need to close the tags. |
|
#6
December 30, 2007
-
Junior Member,
8 posts
|
|
I agree. I was taught to close all HTML tags by an HTML guru who still codes everything by hand. He maintained that by not closing some tags you develop lazy habits which ultimately leads to errors. There's nothing worse than staring at a page of code and wondering where you went wrong.
|
|
#7
January 7, 2008
-
Junior Member,
9 posts
|
|
y that is also not in the html coding standards to leave out closing tags but for tr td tags of table & few others closing tags don't make them look illogical as they do in case of removing closing head
|
|
#8
October 19, 2008
-
Member,
38 posts
|
|
Regardless of whether or not the web site is displayed properly to you when you leave out closing tags, you never know what browser the next person will be using. You take the risk of having a poorly displayed site OR one that doesn't display at all. I'm sure the closing tags serve a purpose or else they wouldn't have been developed
![]() |
| Post Reply |
| Thread Tools | |