Optional Closing Tags in HTML

Everything having to do with programming, all languages (VB, C/C++, C#, HTML, JAVA, PHP, etc)

Moderator: 127.0.0.1

Optional Closing Tags in HTML

Postby forward » Wed Apr 23, 2008 10:34 am

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?
_________________
home based business favorite casual games
forward
n00b
n00b
 
Posts: 10
Joined: Fri Jan 25, 2008 9:04 am

Postby kostyanj » Wed Apr 23, 2008 2:11 pm

Since HTML is a standardized protocol, every browser should parse the document correctly. Whether or not it gets displayed the same way in every browser is a different story.
User avatar
kostyanj
Admin
Admin
 
Posts: 836
Joined: Thu Feb 27, 2003 4:08 am

Postby parvesh_kumar » Thu May 15, 2008 1:29 pm

kostyanj!
you are right
parvesh_kumar
n00b
n00b
 
Posts: 3
Joined: Thu May 15, 2008 1:18 pm

Postby mtajim » Fri Jun 27, 2008 12:55 pm

closing optional tags in HTML is mandatory as most browser can easily parse it. But i would suggest that you follow the standards and close every tag
mtajim
n00b
n00b
 
Posts: 3
Joined: Fri Jun 27, 2008 12:36 pm


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron