Easy Code Checking With Unicorn: the W3C’s Unified ValidatorBy Craig Buckler
As a SitePoint reader, you understand the importance of code validation. Even if you’re not a semantic shaman, fixing problems is far easier when you know your HTML and CSS is valid. There are many online and offline tools to help your validation efforts but you normally need to test HTML, CSS, and feeds separately. HTML5 validators are also in short supply.
The W3C’s Unicorn project could save your sanity. It’s a unified system which aggregates results from several validators to produce a single mark-up report. It includes checks for:
- HTML — including HTML4, XHTML and HTML5
- CSS 1, 2, 2.1, and 3 (although it appears to default to 2.1)
- SVG basic and tiny
- mobile device ‘suitability’
- feed checkers for formats including RSS and Atom
Web Developer Toolbar integration
If you’re using the WDT extension for Firefox (not Chrome — sorry), you can add Unicorn as a validation tool. Open the WDT Options dialog and choose Tools in the left-hand pane. Click Add then enter:
- W3C Unicorn for the description
- choose URL for the tool type, and
- enter the URL
OK your way out and you should now find the Unicorn entry in your WDT Tools menu.
Have you tried Unicorn? Did your site pass validation? Will you use the tool regularly?