Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Xko
    Xko is offline
    New Coder
    Join Date
    Feb 2005
    Location
    Birmingham, England
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy W3C Validation Errors [Solved!]

    Hey folks...

    Well i started with an amazing 29 W3C errors when i checked with their validator but there are some errors i cannot work out what it doesn't like or i just don't know what it's saying to me

    Would someone please enlighten me as to what the following means please?

    Below are the results of attempting to parse this document with an SGML parser.

    1.Line 88, column 67: an attribute value must be a literal unless it contains only name characters

    Code:
    ...lign=center cellpadding=10 cellspacing=0 width=100%><tr>
    You have used a character that is not considered a "name character" in an attribute value. Which characters are considered "name characters" varies between the different document types, but a good rule of thumb is that unless the value contains only lower or upper case letters in the range a-z you must put quotation marks around the value. In fact, unless you have extreme file size requirements it is a very very good idea to always put quote marks around your attribute values. It is never wrong to do so, and very often it is absolutely necessary.

    2. Line 91, column 28: there is no attribute "VALIGN"

    Code:
    <font color="333333" valign="top" width="50%">
    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.

    3. Line 91, column 40: there is no attribute "WIDTH"

    Code:
    <font color="333333" valign="top" width="50%">
    4. Line 132, column 23: an attribute value must be a literal unless it contains only name characters

    Code:
    <td valign=top width=33%>
    5. Line 151, column 67: an attribute value must be a literal unless it contains only name characters

    Code:
    ...lign=center cellpadding=10 cellspacing=0 width=100%><tr>
    6. Line 154, column 40: an attribute value must be a literal unless it contains only name characters

    Code:
    <font color="333333" valign=top width=50%>
    Many Thanks!
    Last edited by Xko; 02-17-2005 at 12:54 PM.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Explanation

    Although there should be enough hints in there to tip you off, here's the explanation in "non-W3C-speak":

    1. It's good practice to always put attribute values in quotes:
    Code:
    align="center" cellpadding="10" cellspacing="0" width="100%"
    Appearently, somewhere in there is an attribute value for which it is necessary (I guess the align and width attributes).
    Just always use quotes and you'll be laughing.

    2. The font element has no valign attribute; AFAIK, only the td and th elements do.

    3. Same as 2, only this time it's the width attribute that's out of place.

    4. and 5: quotes again.

    6. Quotes, and wrong attributes (see 2. and 3.)
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,703
    Thanks
    0
    Thanked 233 Times in 228 Posts
    Hi there Xko,

    1.
    Code:
    ...lign="center" cellpadding="10" cellspacing="0" width="100%"><tr>
    2. & 3.
    Code:
    <font color="333333" valign="top" width="50%">
    Apart from the fact that 'font' is a deprecated element - (replace it with CSS) -, valign and width
    are not attributes of this tag and are therefore meaningless.

    4. & 5.

    require the same action as 1.

    6.

    requires the same action as 2. & 3.

    coothead

    ooops, sorry Ronald, didn't notice your post when I started on mine
    Last edited by coothead; 02-17-2005 at 10:33 AM.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Confirmed!

    Coot,

    Good to see though that you've corroborated my findings...
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #5
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,703
    Thanks
    0
    Thanked 233 Times in 228 Posts
    Hi there Ronald,

    great minds think alike

    coothead

  • #6
    Xko
    Xko is offline
    New Coder
    Join Date
    Feb 2005
    Location
    Birmingham, England
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks both! I done what you suggested as we're 99% there.

    The only problem i have now is as follows...

    Code:
    No Character Encoding Found! Falling back to UTF-8.
    
    I was not able to extract a character encoding labeling from any of the valid sources for such information. Without encoding information it is impossible to reliably validate the document. I'm falling back to the "UTF-8" encoding and will attempt to perform the validation, but this is likely to fail for all non-trivial documents.
    Now that does go straight over my head!

  • #7
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,703
    Thanks
    0
    Thanked 233 Times in 228 Posts
    Hi there Xko,

    you need something like this in the head section...
    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    coothead

  • #8
    Xko
    Xko is offline
    New Coder
    Join Date
    Feb 2005
    Location
    Birmingham, England
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sweet, thanks again you guys!

    Now i just have to sort the rest of the pages out...

    Thanks again!



  •  

    Posting Permissions

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