I would like to suggest checking the markup of SO to uncover bugs.

No, not for accessibility or philosophical reasons, and definitely not for the sake of validation itself.

And forget the goal of producing 100% valid HTML.

I'm just talking about a sensible sanity check to catch simple mistakes before they multiply.

For example, many pages have multiple elements with the same ID value. This is likely to lead to undesired behaviour of CSS or JavaScript in at least some browsers.

6 Answers 6


See also Jeff's Blog Post:


  • 1
    On this I mostly gotta agree with Jeff's pragmatism. There really are much more important things than HTML validity or whether layout is table-based or not (cf. meta.stackexchange.com/questions/24601/valid-html-and-semantics)
    – Jonik
    Commented Oct 5, 2009 at 12:01
  • Agreed. Web Browsers are not standard compatible, and saying "i deliver valid HTML, if the browser does not support it, suck it up" is certainly the wrong approach (it's all about providing service to the user). Accessibility is the big point of course, but you can have an invalid, accessible site as well. Commented Oct 5, 2009 at 15:26

I'm bumping this as I think it's important. Actually SO's HTML is pretty clean, I only see errors about:

  • Missing ALT on images (like it's already been said, important for accessibility)
  • A <tfoot> where it's not allowed
  • Errors with <form>s missing ACTION or other mandatory attributes

So compared to other websites it's already REALLY good, I would say making the most important pages (view question, view question list, ask question, etc) validate won't take more than 1 hour of work. If you don't think following standards is important, at least do it just to make us happy and to be able to say "hey my website validates" :) It's not that much work!

  • 1
    it's not helpful unless you indicate specifically which pages you're talking about. Commented Feb 1, 2010 at 7:47
  • 1
    @Jeff: for example this very page is easily fixable. meta.stackoverflow.com has only 1 error, a missing alt on the envelope icon. It's screaming "fix me please" :) I highly suggest you get this firefox addon, addons.mozilla.org/en-US/firefox/addon/249 .. It will add a very small icon so you can tell instantly which pages validate and which don't. If you click the icon, it will list the errors. Commented Feb 1, 2010 at 7:53
  • we only support validation through the official W3C web validator service. We do not support random Firefox add-ons. Commented Feb 1, 2010 at 18:36
  • 1
    @Jeff: the "random Firefox add-on" uses the same exact code as the W3C web validator service (which is open source). It's impossible for a page to validate in the addon and not on the web service, or the inverse, or for it to have different errors. Going to the web service for every single page is unfeasible.. For this reason the addon is invaluable. Commented Feb 2, 2010 at 3:34

My suspicion is that the HTML source is all ready "too far gone", and that rewriting the code to validate is going to be deemed ... (ahem) ... "more effort than it is worth"

Since we're not talking best practices and philosophy, but pure results, it's fair to say the dev team at this point is (probably) going to concentrate on actual reported problems rather than potential problems that have not been demonstrated to exist.

In other words, if it ain't (demonstrably) broke...

  • Potential bugs are corrected by preemptive action. Do you remember all the problem Opera and Webkit users were having?
    – perbert
    Commented Sep 23, 2009 at 16:48
  • @voyager: Yes, but now we are talking speculation, no? I don't mean for my response to be a resounding endorsement of dev policy for SO, merely an observation based on the data available. Commented Sep 23, 2009 at 17:10

They can always clean as they go. Nothing says that the entire site needs to be cleaned in one fell swoop.

For example, I've been working on a certain high-traffic site for over 2 years to get it dragged into some sort of validation. I work when I can and slowly, slowly it is getting there.


I don't really have a problem with the "errors" here.



Now I found some more mistakes, probably newer than this question. These are the easy ones to be fixed:

  • Community wiki questions and answers have overlapping links in user cards:

    <div class="user-details">
        <a id="history-[post-id]" href="/posts/[post-id]/revisions" title="show revision history for this post">
        [rev-count] revs, [editor-count] users [most-prolific-user-share]%<br><a href="/users/[user-id]">[user-nick]</a>

    Browsers correctly close the first link before <br> and ignore the now superfluous </a>. I suggest displaying the most prolific user share info like this:

    <div class="user-details">
        <a id="history-[post-id]" href="/posts/[post-id]/revisions" title="show revision history for this post">[rev-count] revs, [editor-count] users</a>, [most-prolific-user-share] % by
        <a href="/users/[user-id]">[user-nick]</a>
  • <a name="…"></a> is obsolete in HTML5. The id attribute (ideally of the element one would like to see when linking there) should be used instead. IMO using the id attribute for linking helps keep clean code (no superfluous anchors) and meaningful IDs.

  • Ampersands in gravatar URLs (in top bar, in comments) are not properly encoded as &amp;.
  • The same problem with ampersands is in “advertising info” link in the footer.

Fixing these errors should not get top priority, but it is likely to take only several minutes and I think it’s worth them.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .