Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Holmes is stand-alone diagnostic CSS stylesheet that can highlight potentially invalid or erroneous HTML(5) markup by adding one class
Branch: master
Pull request Compare This branch is 31 commits behind redroot:master.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


holmes.css - CSS Markup Detective

Holmes is stand-alone diagnostic CSS stylesheet that can highlight potentially invalid, inaccassible or erroneous HTML(5) markup by adding one class.

What does it cover?

The holmes.css file will display either an error (red outline), a warning (yellow outline), or a deprecated style (dark grey outline) for flags such as:

  • Missing required attributes on tags, such as alt tags on images (lots of these)
  • Deprecated and Non-W3C Elements - see
  • Non-W3C Attributes - as above, just the most important ones since there are MANY

Beyond these three labels you must use some sort of inspector, such as Firebug, to determine the reason that an element has been flagged.

Why should I use it?

holmes.css is useful for checking the quality of your code (up to W3C HTML5 standards), nitpicking over ensuring markup is valid and semantic, and when you are tasked to fix up and debug an old, OLD website. It has a simple implementation and a mostly unobtrusive effect on your page. Not recommended for live enviroments.

Remember too that these are just guidelines: if something is flagged but you can't change it for a good reason, don't worry about it :) Also use a validator if you want to be 100% sure.

How do I use it?

Simply download a version of the CSS, minified or normal (with docs), and include a stylesheet link to it on your page. Or copy the contents into one of your own stylesheets. Then add the class "holmes-debug" to either your BODY or HTML tag, and you're set to go.

In terms of configuration, such as changing the flag colours: go nuts!

Browser Support

Works 100% in

  • Google Chrome 10+
  • Safari 5+
  • Opera 10+
  • Firefox 3.5+

Due to extensive use of the :not CSS3 selector, holmes.css does not function well in IE 8 and below, but it should (NB: not tested yet) work in Internet Explorer 9. Oh well.


Inspired by,, and procrastination from coursework!


  • 27.04.11 - Changed the no title/empty title on anchor links to a warning level instead of a error level
  • 25.04.11 - Removed test for plaintext, even though it's still in the CSS file, since it BUTCHERED the rest of the testsuite page.
Something went wrong with that request. Please try again.