Computer Hope

Software => Computer programming => Topic started by: Zemfik on February 26, 2008, 01:31:48 PM

Title: Optional Closing Tags in HTML
Post by: Zemfik on February 26, 2008, 01:31:48 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?
Title: Re: Optional Closing Tags in HTML
Post by: Wolfmagi on March 03, 2008, 05:47:26 PM
I don't think so..I write HTML and I can't ignroe closing tags. It's almost instinct to put in all my closing tags. I even put in /body and /html tags.  I think you should put the /head tag in whether it's optional or not.
Title: Re: Optional Closing Tags in HTML
Post by: vishalsaxena17 on March 17, 2008, 10:50:39 PM
hi dear
closing braces are not at all required but it is always good to have coding rules in ur script which will make the program looks more readable and later if required the program can be easily debugged.

even u have noticed that we use to "rem" where required so as to increase readability.
Title: Re: Optional Closing Tags in HTML
Post by: squall_01 on March 24, 2008, 04:57:27 AM
The point is not so its readable as that is true it so if you have javascript or something in the head in won't interfer with anything in the body.