SEO Software
Closed Thread
Results 1 to 6 of 6

Thread: Optional Closing Tags in HTML

  1. #1

    Default 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?


  2. SEO Software

  3. #2

    Default

    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.

  4. #3

    Default

    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.

  5. #4
    Fulltime Member ikki will become famous soon enough ikki will become famous soon enough
    Join Date
    Oct 2007
    Location
    ... at Rauru.com :D Mood: Daring
    Posts
    696
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Even if they're optional, I believe that it's better to keep using them. Old browsers might not render your sites properly!

  6. #5
    !Sandy
    Guest

    Default

    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.

  7. #6
    Retired Spyros has a spectacular aura about Spyros has a spectacular aura about
    Join Date
    May 2006
    Location
    Athens, Hellas
    Posts
    1,249
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

Closed Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts