Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Validation Failed

Posted by: NovaArgon Jun 10 2007, 09:14 PM

I am trying to validate my page and i'm not sure what I need to do to fix the errors. Could you guys take a look at this and point me in the right direction?

Thanks so much for your advice
http://www.adviceforums.org








CODE
Document Checked

    * URL: http://www.adviceforums.org
    * Last modified: Mon, 11 Jun 2007 10:05:41 GMT
    * Character encoding: UTF-8
    * Level of HTML: Unknown

Errors and Warnings

    * Line 2, character 1:

      <head>
      ^

      Error: character < invalid: only delimiter >, delimiter [, system identifier and parameter separators allowed
    * Line 2, character 1:

      <head>
      ^

      Error: cannot continue because of previous errors

Input

     1   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 transitional//EN"
     2   <head>
     3   <title>Advice Forums</title>
     4   <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
     5   <style>
     6       * { font-family: verdana; font-size: 10pt; COLOR: gray; }
     7       b { font-weight: bold; }
     8       table { height: 50%; border: 1px solid gray;}
     9       td { text-align: center; padding: 25;}
    10  
    11       </style>
    12  
    13   </head>
    14   <body>
    15   <center>
    16   <br></br>
    17   <br></br>
    18   <br></br>
    19   <br></br>
    20   <table>
    21   <tr>
    22   <td><img src="logo.gif"></td>
    23   </tr>
    24   <tr>
    25   <td><b><a href="http://www.adviceforums.org/phpBB3">Welcome to the home of Advice Forums</a></b></td>
    26   </tr>
    27   <tr>
    28   <td>We are looking for a MOD team to help manage the forums. If you are interested please email your request to adviceforums@gmail.com<br> or post on our <b><a href="http://www.adviceforums.org/phpBB3/viewtopic.php?f=2&t=1">Test Forums</a></b></td>
    29   </tr>
    30   <tr>
    31   <td style="font-size: 8pt">Date Created: 06/10/2007</td>
    32   </tr>
    33   </table><br><br>
    34   </center>
    35   </body>
    36   </html>

Posted by: pandy Jun 10 2007, 09:47 PM

The doctype lacks the closing ">". The validator sees the whole document as part of the doctype.

BTW you may want to use a full doctype, the long version with an URL. The one you use is legit, once corrected, but browsers use the way the doctype is written as a trigger for their "doctype switching". In short that means they will be more standards compliant and not show so many differences in the rendering of the page if they are in Standards Mode, which is triggered by a "long" doctype.
http://www.htmlhelp.com/tools/validator/doctype.html
http://hsivonen.iki.fi/doctype/

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)