SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Oct 2012
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    30 errors in W3C markup validation...are these high-priority fixes?

    Forgive the possibly noobish question, but we recently redesigned our site jobstr.com and on an SEO friend's suggestion ran it through the W3C markup validator: http://validator.w3.org. The home page produces 30 errors, and I don't really know how to interpret the output (pasted below). How critical are these errors? And can anyone explain in noob-friendly terms in what ways are they are hurting our site...do they affect performance? SEO-friendliness? Something else? In short I just want to know what priority to assign fixing them, since our time/budget are limited.

    Was going to paste the W3C error output here, but it didn't format well, but you can see it here: http://validator.w3.org/check?uri=jo...Inline&group=0

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,207
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    A lot of the time, validator results are just there to altert you to potential problems. On this page there are some typos that should be fixed, but they are pretty self explanatory. for example,

    Code:
    <h2 class="hp-head">Featured Job</h1>
    The element starts as an <h2> and ends as an <h1>! It's handy to have that pointed out.

    Some of the Facebook errors you just have to put up with if you are going to use that 3rd party code. I'm sure FB has tested it to make sure it works, so let the validator have its tantrum if it must. The browser won't care.

    Elsewhere, the validator is pointing out that you have used an ID more than once, which isn't allowed in HTML, even though the browser may let you off. And often it's safer to write & as &amp;, because the ampersand has meaning in programming that could get confused.

  3. #3
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Line 7, Column 115: Attribute xmlns:fb not allowed here.
    Line 7, Column 115: Attribute with the local name xmlns:fb is not serializable as XML 1.0.
    Line 31, Column 41: Bad value og:title for attribute name on element meta: Keyword og:title is not registered.
    Line 32, Column 196: Bad value og:description for attribute name on element meta: Keyword og:description is not registered.
    Line 33, Column 78: Bad value og:image for attribute name on element meta: Keyword og:image is not registered.
    Don't fix these, they're Facebook's fault.
    Line 41, Column 54: Bad value X-UA-Compatible for attribute http-equiv on element meta.
    I think you have a HTTP header with X-UA-Compatible, which makes the element redundant. Also, do you really need it to say IE=7 rather than IE=Edge ?
    Line 315, Column 212: Bad value _new for attribute target on element a: Reserved keyword new used.
    Use _blank instead.
    Line 315, Column 256: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.
    Fix this one. A user with images disabled won't know where the link goes. Should be
    Code:
    alt="As seen in the NEW YORK POST"
    Line 315, Column 256: The border attribute is obsolete. Consider specifying img { border: 0; } in CSS instead.
    Just do it.
    Line 354, Column 30: The language attribute on the script element is obsolete. You can safely omit it.
    Omit it.
    Line 378, Column 74: End tag h1 seen, but there were open elements.
    Line 382, Column 112: End tag h2 seen, but there were open elements.
    Line 409, Column 66: End tag h1 seen, but there were open elements.
    Fix these.
    Line 573, Column 56: Duplicate ID search.
    Fix this (just rename one of the 'search'es).

    Also fix the rest of the errors.

    Not too hard, was it?
    Simon Pieters

  4. #4
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also note that alt="" is missing in some images that you insert with script that the validator doesn't see.

    For
    Code:
    <h1><img src="/images/busy.gif" /> Just a moment...</h1>
    use

    Code:
    <h1><img src="/images/busy.gif" alt="" /> Just a moment...</h1>
    (since a user with images disabled would still get the text "Just a moment..." which is what the logo means already)
    Simon Pieters

  5. #5
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Good one.

    Adding alt="" prevents most AT from announcing the URL of the image, which 99% of the time is useless and people hate that. I think it's as important as proper filled alts for the other images.


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
  •