Programming, website development forum Get latest updates by RSS Follow TechnicalTalk on Twitter Follow TechnicalTalk on Facebook 
HomeSearchRecent PostsLoginRegisterContact Us

Username  
Password    
  Forgot your password?  

Pages: [1]   Go Down
 
  Email this topic  |  Print
0 Members and 1 Guest are viewing this topic.

Optional Closing Tags in HTML

 
webmaster forum
Anchor  Offline
Activity
0%
 
New Coder
Posts: 20
Topics: 16
January 17, 2009, 09:35:01 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?
 
webmaster forum
polas  Offline
Activity
33.33%
 
Code Guru
Gender: Male
Posts: 1399
Topics: 85
WWW
January 19, 2009, 05:23:36 AM

That seems strange, I would consider not closing a tag to be very poor style, even if a web browser does parse it correctly. Really, it takes very little effort to do </head> and it avoids any issues with tools written by authors who do not realise that that closing tag is optional.

Mesham Type Oriented Parallel Programming Language, Free online technical support
 
webmaster forum
Activity
0%
 
New Coder
Posts: 17
Topics: 2
August 13, 2010, 08:33:38 AM

Leaving HTML tags option is a real bad idea and closing tags is not difficult too, and it can annoy those who don’t know about it.

immobilien mallorca | Cheap Website Design | chicago movers
 
webmaster forum
Wally  Offline
Activity
0%
 
New Coder
Location: USA
Gender: Male
Posts: 37
Topics: 3
WWW
August 13, 2010, 10:32:17 AM

100% agreement on the bad idea comment, it's lazy coding leaving things like closing tags out. Never let yourself fall into bad habits they have a way of biting you in the rear down the road.

Totally-Gaming, when you really want to talk games.
 
webmaster forum
polas  Offline
Activity
33.33%
 
Code Guru
Gender: Male
Posts: 1399
Topics: 85
WWW
August 13, 2010, 04:16:41 PM

Never let yourself fall into bad habits they have a way of biting you in the rear down the road.

Agreed!

Mesham Type Oriented Parallel Programming Language, Free online technical support
 
webmaster forum
Admin  Offline
*
 
Code Guru
Location: India
Gender: Male
Posts: 1387
Topics: 105
NaviBuster NaviBuster
WWW
August 13, 2010, 08:15:55 PM

To be a Good programmer always remember to follow the rules that exist for that language.
Missing closing tags in HTML is considered as poor programming practice and it can put bad impression about you if somebody viewing your site notices it. As every one said it really takes a small amount of time to write the closing tag, so don't ignore it.
 
  Email this topic  |  Print
Pages: [1]   Go Up
 
Jump to:  



Powered by SMF 1.1.15 | SMF © 2011, Simple Machines


Google visited last this page January 15, 2012, 04:22:36 PM