Optional Closing Tags in HTML

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • My_Donna
    Junior Member
    • Mar 2007
    • 1

    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?
  • Guest

    #2
    closing tags in html is option but it's compulsory in xhtml. 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.



    Last edited by megri; 08-26-2008, 01:05 PM.

    Comment

    • newmath071
      Junior Member
      • Aug 2008
      • 1

      #3
      if you've open tag it should be closed , if you hadn't open it you can write other code ... you can simply write code without head and body tags in HTML but in xHTML it's strict rule

      Comment

      • Kuruk
        Junior Member
        • Jul 2008
        • 9

        #4
        Hi


        I think XHTML is very strict about its tag rather than html.
        some HTML optional tags are write below.
        * </area>
        * </base>
        * <body>
        * </body>
        * </br>
        * </col>
        * </colgroup>
        * </dd>
        * </dt>
        * <head>
        * </head>
        * </hr>
        * <html>
        * </html>
        * </img>
        * </input>
        * </li>
        * </link>
        * </meta>
        * </option>
        * </p>
        * </param>
        * <tbody>
        * </tbody>
        * </td>
        * </tfoot>
        * </th>
        * </thead>
        * </tr>

        thanks

        Comment

        • kamal12
          Junior Member
          • Jul 2008
          • 2

          #5
          new closing tags

          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

          Comment

          • Guest

            #6
            <head> tag is very important because it contain the following tags can be added to the head section: <base>, <link>, <meta>, <script>, <style>, and <title>.

            Comment

            Working...