Alex Rivera | Logout

Are there any command line validation tools for HTML and CSS?

Asked 2011-07-11T05:43:14.357
59

Is anyone aware of command line tools that can validate CSS and/or HTML?

The W3C offers its validators for local installation, with directions to use from the command line, but the installation process is a nightmare for anyone who isn't a seasoned Java developer.

I've searched with Google, but can't find anything.

Ideally I'd like to use a tool (or tools) that I can point at my CSS, and have it report back on any errors. I want it to be local to increase the speed of my debugging cycles.

Ideally, the tools will understand HTML5 and CSS3.

Edit
Report

1 Answer

1

Although not directly a solution to your problem, you could consider using a CSS-extension framework for the validation part. I use SASS extensively in all my web projects and find it indispensible when you get used to it. Besides all the fancy mixins and variables features etc. it will also perform a validation of your CSS/SASS markup and report for errors as it is perfectly backwards compatible with regular CSS3. The nice thing is that it works as a Ruby Gem which means that it runs locally and can be integrated with other workflows through either Ruby or the command line (terminal in unix environment).

Take it for a spin: http://sass-lang.com/docs/yardoc/

Run sass style.scss and see what happens.

answered 2011-07-11T08:31:34.577

Your Answer