Advanced Search

Results 1 to 6 of 6

Thread: HTML Validation Problems

  1. #1
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default HTML Validation Problems

    Hey guys

    I'm trying to set up a simple page and it looked good at first but after I started trying to get a passing validation its got all messed up.

    Would any of you mind talking a look at it and help me figure out how what I need to do to fix it?

    Thank you very much for your advice and help i'm new to this.

    Below is my test results and code from

    http://www.adviceforums.org

    Code:
       1.  Error  Line 13 column 6: an attribute specification must start with a name or name token.
    
          <style="font-size: 10pt">
    
          An attribute name (and some attribute values) must start with one of a restricted set of characters. This error usually indicates that you have failed to add a closing quotation mark on a previous attribute value (so the attribute value looks like the start of a new attribute) or have used an attribute that is not defined (usually a typo in a common attribute name).
    
          ✉
       2. Error Line 13 column 6: document type does not allow element "STYLE" here.
    
          <style="font-size: 10pt">
    
          The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
    
          One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
    
          ✉
       3. Error Line 17 column 43: end tag for element "CENTER" which is not open.
    
          <tr><td><center><img src="logo.gif"</center></td></tr>
    
          The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.
    
          If this error occured in a script section of your document, you should probably read this FAQ entry.
    
          ✉
       4. Error Line 17 column 48: end tag for element "TD" which is not open.
    
          <tr><td><center><img src="logo.gif"</center></td></tr>
    
          ✉
       5. Error Line 17 column 53: end tag for element "TR" which is not open.
    
          <tr><td><center><img src="logo.gif"</center></td></tr>
    
          ✉
       6. Error Line 22 column 103: end tag for element "A" which is not open.
    
          ...lcome to the home of Advice Forums</a></center></b></td></tr>
    
          ✉
       7. Error Line 22 column 112: end tag for element "CENTER" which is not open.
    
          ...the home of Advice Forums</a></center></b></td></tr>
    
          ✉
       8. Error Line 22 column 116: end tag for element "B" which is not open.
    
          ...home of Advice Forums</a></center></b></td></tr>
    
          ✉
       9. Error Line 22 column 121: end tag for element "TD" which is not open.
    
          ...of Advice Forums</a></center></b></td></tr>
    
          ✉
      10. Error Line 22 column 126: end tag for element "TR" which is not open.
    
          ...vice Forums</a></center></b></td></tr>
    
          ✉
      11. Error Line 27 column 249: end tag for element "A" which is not open.
    
          ...viewtopic.php?f=2&t=1">Test Forums</a></center></b></td></tr>
    
          ✉
      12. Error Line 27 column 258: end tag for element "CENTER" which is not open.
    
          ....php?f=2&t=1">Test Forums</a></center></b></td></tr>
    
          ✉
      13. Error Line 27 column 262: end tag for element "B" which is not open.
    
          ...?f=2&t=1">Test Forums</a></center></b></td></tr>
    
          ✉
      14. Error Line 27 column 267: end tag for element "TD" which is not open.
    
          ...t=1">Test Forums</a></center></b></td></tr>
    
          ✉
      15. Error Line 27 column 272: end tag for element "TR" which is not open.
    
          ...Test Forums</a></center></b></td></tr>
    
          ✉
      16. Error Line 32 column 71: end tag for element "CENTER" which is not open.
    
          ... 8pt"><center>Date Created: 06/10/2007</center></td></tr>
    
          ✉
      17. Error Line 32 column 76: end tag for element "TD" which is not open.
    
          ...ter>Date Created: 06/10/2007</center></td></tr>
    
          ✉
      18. Error Line 32 column 81: end tag for element "TR" which is not open.
    
          ...Created: 06/10/2007</center></td></tr>
    
          ✉
      19. Error Line 34 column 7: end tag for element "TABLE" which is not open.
    
          </table>
    
          ✉
      20. Error Line 35 column 6: end tag for "STYLE" omitted, but its declaration does not permit this.
    
          </body>
    
              * You forgot to close a tag, or
              * you used something inside this tag that was not allowed, and the validator is complaining that the tag should be closed before such content can be allowed.
    
          The next message, "start tag was here" points to the particular instance of the tag in question); the positional indicator points to where the validator expected you to close the tag.
    
          ✉
      21. Info Line 13 column 0: start tag was here.
    
          <style="font-size: 10pt">

  2. #2
    Join Date
    Feb 2007
    Posts
    293
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You should probably check out a good tutorial to get a better idea of how to do styles, for example http://www.w3schools.com/css/default.asp

    As for your page, the font style doesn't go in a tag as you have it in line 13. Just take that line out. To make everything in the document have a font size, you would put a style into the head of the document:
    Code:
    <style>
    body p td div li {font-size:10pt;}
    </style>
    Your problem with line 17 is that you didn't close the gif tag (see the red bracket)

    <img src="logo.gif">

    Again, it's great that you're trying to learn. But if you follow the steps in that tutorial, you'll learn faster.

  3. #3
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks so much for the advice and the link!

    I need all the help I can get.

  4. #4
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    Here's your problems:

    1. Error Line 13 column 6: an attribute specification must start with a name or name token.

    <font style="font-size: 10pt">

    An attribute name (and some attribute values) must start with one of a restricted set of characters. This error usually indicates that you have failed to add a closing quotation mark on a previous attribute value (so the attribute value looks like the start of a new attribute) or have used an attribute that is not defined (usually a typo in a common attribute name).


    2. Error Line 13 column 6: document type does not allow element "STYLE" here.

    <font style="font-size: 10pt">

    The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

    One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).


    3. Error Line 17 column 43: end tag for element "CENTER" which is not open.

    <tr><td><center><img src="logo.gif"></center></td></tr>

    The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

    If this error occured in a script section of your document, you should probably read this FAQ entry.


    4. Error Line 17 column 48: end tag for element "TD" which is not open.

    <tr><td><center><img src="logo.gif"></center></td></tr>


    5. Error Line 17 column 53: end tag for element "TR" which is not open.

    <tr><td><center><img src="logo.gif"></center></td></tr>


    6. Error Line 22 column 103: end tag for element "A" which is not open.

    ...lcome to the home of Advice Forums</a></center></b></td></tr>
    Could I please see your page's code?

    7. Error Line 22 column 112: end tag for element "CENTER" which is not open.

    ...the home of Advice Forums</a></center></b></td></tr>
    Could I please see your page's code?

    8. Error Line 22 column 116: end tag for element "B" which is not open.

    ...home of Advice Forums</a></center></b></td></tr>
    Could I please see your page's code?

    9. Error Line 22 column 121: end tag for element "TD" which is not open.

    ...of Advice Forums</a></center></b></td></tr>
    Could I please see your page's code?

    10. Error Line 22 column 126: end tag for element "TR" which is not open.

    ...vice Forums</a></center></b></td></tr>
    Could I please see your page's code?

    11. Error Line 27 column 249: end tag for element "A" which is not open.

    ...viewtopic.php?f=2&t=1">Test Forums</a></center></b></td></tr>
    Could I please see your page's code?

    12. Error Line 27 column 258: end tag for element "CENTER" which is not open.

    ....php?f=2&t=1">Test Forums</a></center></b></td></tr>
    Could I please see your page's code?

    13. Error Line 27 column 262: end tag for element "B" which is not open.

    ...?f=2&t=1">Test Forums</a></center></b></td></tr>
    Could I please see your page's code?

    14. Error Line 27 column 267: end tag for element "TD" which is not open.

    ...t=1">Test Forums</a></center></b></td></tr>
    Could I please see your page's code?

    15. Error Line 27 column 272: end tag for element "TR" which is not open.

    ...Test Forums</a></center></b></td></tr>
    Could I please see your page's code?

    16. Error Line 32 column 71: end tag for element "CENTER" which is not open.

    ... 8pt"><center>Date Created: 06/10/2007</center></td></tr>
    That should work. Hmm.

    17. Error Line 32 column 76: end tag for element "TD" which is not open.

    ...ter>Date Created: 06/10/2007</center></td></tr>
    Could I please see your page's code?

    18. Error Line 32 column 81: end tag for element "TR" which is not open.

    ...Created: 06/10/2007</center></td></tr>
    Could I please see your page's code?

    19. Error Line 34 column 7: end tag for element "TABLE" which is not open.

    </table>
    Could I please see your page's code?

    20. Error Line 35 column 6: end tag for "STYLE" omitted, but its declaration does not permit this.

    </body>

    * You forgot to close a tag, or
    * you used something inside this tag that was not allowed, and the validator is complaining that the tag should be closed before such content can be allowed.

    The next message, "start tag was here" points to the particular instance of the tag in question); the positional indicator points to where the validator expected you to close the tag.


    21. Info Line 13 column 0: start tag was here.

    <style="font-size: 10pt">

    replace <style="font-size: 10pt"> with:
    <style type="text/css">
    body {
    font-size: 10pt;
    }
    </style>
    Also, where I added 'font,' replace </style> with </font>. If you don't have </style>, add </font> after where you are applying the style to.
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

  5. #5
    Join Date
    Jun 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Dude, don't use tables, those are old and obsolete. Use Divisions dude, alot more simple.

  6. #6
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    One, don't use <font>...use <span>. <font>'s on its way out.

    Two, don't use center. If you have to use tables, which I advise against, do the following instead:

    Code:
    <td style="text-align: center;">centered content...</td>
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

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
  •