Programming
Article
By Craig Buckler

Easy Code Checking With Unicorn: the W3C’s Unified Validator

By 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

The tool can be used online at validator.w3.org/unicorn/ or you can download the open source Java code for offline usage.

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
    http://validator.w3.org/unicorn/check?ucn_task=conformance&ucn_uri=

WDT options

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?

More:
w3c, wdt
Recommended
Sponsors
The most important and interesting stories in tech. Straight to your inbox, daily. Get Versioning.
Login or Create Account to Comment
Login Create Account