Optional Closing Tags in HTML

Zemfik

Solid State Member
Messages
6
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?
 
No, that makes a lot of sense, I didn't realize it either. But that doesn't mean that I would stop doing it.
 
intresting, i was unaware of that. its never been mentioned in any of the guides that ive read along the way either.
 
Does that work with xhtml too, or just with html?

I was reading an article about xhtml the other day that said xhtml elements always have to have closing tags.
 
Back
Top Bottom