Strange W3 Validator Errors - Help Needed...

Discussion in 'HTML & Website Design' started by Mr.Dog, Dec 3, 2012.

  1. #1
    Hello,

    I know that Google doesn't like sites containing errors, so I'm using the W3 Validator to verify the errors and correct them.
    For SEO it's essential to correct errors. So here I am correcting,...

    But surprisingly the "errors" found by W3 are rather weird - not real errors in my opinion. Here are a few, tell me what you think:

    required attribute "alt" not specified
    I intentionally avoid the alt texts, because of Panda, in order to reduce SEO juice... so this is an "error"?

    document type does not allow element "div" here; missing one of "button", "map", "object", "ins", "del", "noscript" start-tag
    I am using plenty of DIVs, even for site menu buttons, fields for featured ads, text boxes etc... the above "error" appears at a site menu button DIV (I have 5-8 buttons per site with HTML hover effects), the entire DIV is linked to a page

    Line 80, Column 3: start tag was here
    <br>I don't get this one. Yes, the only tag on that line is <br>, because this is a clear white line break! What can be wrong with a line break??! Lots of this are appearing as "errors".

    Line 87, Column 48
    :
    there is no attribute "hspace"
    …ref="folder/page.htm"><img hspace="100" vspace="40" src="image.j…I don't get this one either. Yes, there is an "hspace" attribute and there are endless HTML courses/sources explaining them. Perhaps not compatible with all software? But this tag is actually working for me - otherwise I wouldn't be using it!

    Line 87, Column 61
    :
    there is no attribute "vspace"
    Similar issue with "vspace" - yes, there is such an attribute!

    Line 224, Column 42: there is no attribute "width"
    …<iframe src="frame.htm" width="200" height="15" scrolling="no" marginw…
    Of course there is "width". Basic HTML coding...

    Line 224, Column 16
    : there is no attribute "src"

    <iframe src="frm.htm" width="400" height="20" scrolling="no" margi…
    Of course there is "width". Basic HTML coding...

    And there are lots and lots of similar issues, errors.

    What do you think about these? I wonder how Google sees errors on my site. Could these be considered "real errors"?

    I honestly think that the W3 Validator is more than imperfect. The most obvious codes show up as "errors".

    I checked several other major sites - while I had <50 "errors", some of them had 200+ "errors".
     
    Mr.Dog, Dec 3, 2012 IP
  2. ntmedia

    ntmedia Active Member

    Messages:
    118
    Likes Received:
    11
    Best Answers:
    7
    Trophy Points:
    90
    #2
    required attribute "alt" not specified
    I intentionally avoid the alt texts, because of Panda, in order to reduce SEO juice... so this is an "error"?

    Depending on DOCTYPE it has to be an alt tag. It doesn't need to be filled though. E.g. <img src="..." width="xx" height="xx" alt />

    document type does not allow element "div" here; missing one of "button", "map", "object", "ins", "del", "noscript" start-tag
    I am using plenty of DIVs, even for site menu buttons, fields for featured ads, text boxes etc... the above "error" appears at a site menu button DIV (I have 5-8 buttons per site with HTML hover effects), the entire DIV is linked to a page

    For example you can't put divs inside of spans. That's an error.

    Line 80, Column 3: start tag was here
    <br>I don't get this one. Yes, the only tag on that line is <br>, because this is a clear white line break! What can be wrong with a line break??! Lots of this are appearing as "errors".

    You should close break row with <br/>

    Line 87, Column 48
    :
    there is no attribute "hspace"
    …ref="folder/page.htm"><img hspace="100" vspace="40" src="image.j…I don't get this one either. Yes, there is an "hspace" attribute and there are endless HTML courses/sources explaining them. Perhaps not compatible with all software? But this tag is actually working for me - otherwise I wouldn't be using it!

    hspace isn't supported in HTML5 and it's [FONT=verdana, helvetica, arial, sans-serif]deprecated in [/FONT]HTML 4.01

    Line 87, Column 61
    :
    there is no attribute "vspace"
    Similar issue with "vspace" - yes, there is such an attribute!

    Same as above

    Line 224, Column 42: there is no attribute "width"
    …<iframe src="frame.htm" width="200" height="15" scrolling="no" marginw…
    Of course there is "width". Basic HTML coding...

    Depending on DOCTYPE you should use width="200" (HTML 4) or width="200px" (HTML5).

    Line 224, Column 16
    : there is no attribute "src"

    <iframe src="frm.htm" width="400" height="20" scrolling="no" margi…
    Of course there is "width". Basic HTML coding...

    Src should work, that's sure. There's no difference between HTML 4.01/HTML5 and xHTML with this one.

    If you need help with anything else, let me know.
     
    ntmedia, Dec 3, 2012 IP
  3. Mr.Dog

    Mr.Dog Active Member

    Messages:
    912
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Thanks ntmedia!

    Any more suggestions, opinions?

    I find it awkward that new coding languages aren't backward compatible. Now I have to revise a lot of coding... But I'll do all that's necessary to solve the problems.
     
    Mr.Dog, Dec 3, 2012 IP
  4. ntmedia

    ntmedia Active Member

    Messages:
    118
    Likes Received:
    11
    Best Answers:
    7
    Trophy Points:
    90
    #4
    You got to make sure that you're using the DOCTYPE that you're most familiar with.

    For example not closing input elements in HTML4/5 won't give you a w3 error, but it will in xHTML.

    What's the DOCTYPE you're using? I suggest using HTML 4 transitional as it will probably give you less errors than xHTML might give you. Although if you've got some HTML5 elements on the page you've got to use its DOCTYPE...
     
    ntmedia, Dec 3, 2012 IP
  5. Mr.Dog

    Mr.Dog Active Member

    Messages:
    912
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Mine says this:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
     
    Mr.Dog, Dec 3, 2012 IP
  6. ntmedia

    ntmedia Active Member

    Messages:
    118
    Likes Received:
    11
    Best Answers:
    7
    Trophy Points:
    90
    #6
    As I thought. That's the most strict DOCTYPE out there. It can give you a lot of problems if you don't know what you're doing...
    I am available for hire if you need fixing such errors. Price would depend on the number of errors of course.
     
    ntmedia, Dec 3, 2012 IP
  7. davetrebas

    davetrebas Active Member

    Messages:
    301
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    78
    #7
    I agree with ntmedia's analysis.

    Sounds like you are doing your HTML directly, by hand. Some of the higher level systems like WordPress take care of all that and let you focus on content and marketing. They have thousands of themes that will let you do almost any layout. WordPress and many of the themes are free.

    Other programs like Dreamweaver will also manage a lot of the HTML to prevent these sorts of errors.
     
    davetrebas, Dec 3, 2012 IP
  8. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #8
    Unless you have some specific reason to use an XHTML doctype, don't. There's no "I don't need it, but it'll ..." reason to use it.
     
    Rukbat, Dec 3, 2012 IP
  9. Mr.Dog

    Mr.Dog Active Member

    Messages:
    912
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #9
    Until now I never paid attention to this "DOCTYPE" thing, it seemed to appear there automatically... which one should I pick?

    What should I place there?

    Since, indeed... I'm coding it all by hand.
     
    Mr.Dog, Dec 3, 2012 IP
  10. ntmedia

    ntmedia Active Member

    Messages:
    118
    Likes Received:
    11
    Best Answers:
    7
    Trophy Points:
    90
    #10
    I recommend using HTML 4 for now (if you're not going to use HTML 5 elements in your page). I prefer xHTML's strict markup though.
     
    ntmedia, Dec 3, 2012 IP
  11. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #11
    Rukbat, Dec 3, 2012 IP
  12. N Solanki

    N Solanki Member

    Messages:
    153
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #12
    You should also verify your CSS and HTML code as well as with w3c linkchecker.
     
    N Solanki, Dec 5, 2012 IP
  13. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #13
    Xenu (runs on Windows only) will also check the links of a site.

    And in case someone misunderstands your post (it's easy the way it's worded), Linkchecker checks links, it doesn't verify CSS or HTML.
     
    Rukbat, Dec 5, 2012 IP