Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

When I'm developing a website locally sometimes I want to check if the html is valid but I haven't been able to find a good tool. I want it partial as a sanity check when I'm troubleshooting layout issues.

Can you please suggest a tool that can validate HTML offline? I'm not looking for validation inside of an IDE but something that will load the page from the web server.

Thank you!

share|improve this question

5 Answers

up vote 20 down vote accepted

You can download the source and/or packages direct from w3[1].

[1] http://validator.w3.org/source/

share|improve this answer
1  
+1, and they have a LOT of other really cool tools and libraries available for download. – Tim Post Aug 1 '10 at 20:15

To save time I use a Firefox Extension called HTML Validator. It adds validation to your view source window, tells you errors and warnings in a bottom pane. Also puts an icon in the bottom of your window showing you a quick reference for yes/no on validation. If no, then you just view source and it shows you exactly what your errors are.

Also validates accessibility.

share|improve this answer
1  
Oh yeah. Validate as you go. Saves you an extra manual step on each page. Hasn't yet been updated for HTML5, though. – Grant Palin Aug 2 '10 at 6:24

Have you checked out HTML Tidy?

share|improve this answer
This is a very good solution too; and since they provide binaries for almost all platforms it's also a good option for beginners. – fwa Aug 1 '10 at 21:43

You can validate HTML and CSS locally (and do a lot of other useful things) with the Web Developer Toolbar add-on for Firefox. It's also available for Google Chrome.

share|improve this answer
This is just a quick way of submitting it to the W3C validator. Hardly 'offline'. – Kris Aug 1 '10 at 21:13
Apologies, I misread the question. You can validate locally, but not offline. – Virtuosi Media Aug 1 '10 at 21:26

In Debian/Ubuntu you can do:

sudo apt-get install w3c-markup-validator

This will get you the web interface.

If you want to validate from the console, edit /usr/share/doc/w3c-markup-validator/examples/validate.pl and install libwebservice-validator-html-w3c-perl. Now you can run validate.pl with an URL to validate.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.