-
Member
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?
-
-
Member
hah...!!!
really, it's optional...!!!
but even though it's optional, it should have a closing though, considering the behavior of a browser.
internet explorer and firefox have a different behavior, even with a good html coding, those two will show a difference. cmiiw.
once, i forgot to close a < i > tag on a post.
on one browser it show normal, but in the other, it got italic all the way to the footer.
-
-
Junior Member
yeah I guess the < head > tag is optional but I wouldn't get rid of it without knowing how all common browsers will react, you could end up with some funky results. I prefer not to leave out closing tags I just think I t is bad practice and usually I code to xhtml standards so I am used to having to include all the closing tags.
-
-
Fulltime Member
Even if they're optional, I believe that it's better to keep using them. Old browsers might not render your sites properly!
-
-
I prefer to close every tag. It just seems neater to me. There's also the fact that some browsers view codes differently. In Firefox your website may look fine, but in IE it could be completely messed up. I hate when that happens.
-
-
Retired
If you unplug the power cable from your computer it will shut down. Then why we need to use the shutdown utility our OS provides?
It's the same logic. It may work, but it's not the correct way to do it. Also you might encounter troubles, like browser incompatibilities like the others said.
And have in mind that this chaos in the HTML language forced to W3C to create xHTML; a more structured and well-formed version of HTML which follows some of XML's standards and strong points.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
Bookmarks