Free Scan: Update Your PC's Outdated Drivers to Optimize Performance
June 24th, 2007, 04:13 PM
|
#1 (permalink)
| | Junior Member
Join Date: Jun 2007
Posts: 3
| Optional Closing Tags in HTML
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? |
| |
June 24th, 2007, 04:31 PM
|
#2 (permalink)
| | ᅟᅠ
Join Date: Oct 2001 Location: ɐqɟs
Posts: 10,446
|
I too didn't realize that closing tag was optional. But I don't feel like I missed anything because I would have always opted to use it even if it was not required. |
| |
June 24th, 2007, 04:36 PM
|
#3 (permalink)
| | SoMuchAnime-SoLittleTime
Join Date: Aug 2003 Location: Plymouth, WI
Posts: 13,697
| Always use closing tags!
If you don't use them the web browser that the user uses needs to guess what you wanted to happen, which may break the page for some people.
As of XHTML standards (and maybe HTML 4) closing tags are required and the browser doesn't add in the closing tags anymore (or it is not supposed to at least).
__________________
The mark of the immature man is that he wants to die nobly for a cause, while the mark of a mature man is that he wants to live humbly for one.
|
| |
June 25th, 2007, 01:05 PM
|
#4 (permalink)
| | Super F@D Folder
Join Date: Jun 2004
Posts: 5,004
|
ex is right. closing tags are there for a purpose! The only time closing tags frustrate me is with tables and that's just cus i learned tables without them. look at the new xhtml 1.0 transitional standard...it's probably the best to go with for compatibility at this point  xhtml 1.0 strict if you like a challenge!  |
| |
June 25th, 2007, 02:18 PM
|
#5 (permalink)
| | SoMuchAnime-SoLittleTime
Join Date: Aug 2003 Location: Plymouth, WI
Posts: 13,697
|
Yep, XHTML transitional works best.
But XHTML Strict would be better, especially if you want to make changes in the future.
If you've got a bit of extra time, I recommend you practice using Strict, so that it comes easier in the future. And of course, if you have any CSS questions, you can just ask on TIMO.  |
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | |
Posting Rules
| You may post new threads You may post replies You may not post attachments You may not edit your posts HTML code is Off | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |