14

I would like to pass a few pages of a web application we are building through an HTML5 validator. I found several "online" validation tools available, but for privacy reasons I would rather not upload our pages for checking.

Do you know any offline HTML5 validation tool / library?

E.Z.
  • 6,393
  • 11
  • 42
  • 69

2 Answers2

8

You can download a vnu.jar release for checking HTML5 documents offline. See https://github.com/validator/validator/releases/latest for the actual download file, and see https://validator.github.io/validator/ for more information

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
  • 2
    This should be the accepted answer. It's a matter of a one-liner to install an offline HTML5 validation tool (as requested by the OP) as of today, e.g. `pip install html5validator` (this example requires Python and Java installed), see the [documentation](https://github.com/svenkreiss/html5validator) for usage examples. – Peterino Oct 30 '15 at 10:00
  • 1
    To use `vnu.jar` to validate as you type ("on the fly") in the Atom editor, use the new [`linter-vnu`](https://atom.io/packages/linter-vnu) Atom package (published today). – Graham Hannington Mar 31 '16 at 07:02
1

So far W3C has only published the DTD up to HTML 4.01.

Download libs: http://validator.w3.org/sgml-lib.tar.gz

In September 2012, the W3C proposed a plan (wikipedia.org) to release a stable HTML5 Recommendation by the end of 2014 and an HTML 5.1 specification Recommendation by the end of 2016.

Therefore I believe that the libs for HTML5 are coming this year.

Meanwhile you can use an unofficial DTD file, available here: http://www.cs.tut.fi/~jkorpela/html5-dtd.html

E.Z.
  • 6,393
  • 11
  • 42
  • 69
Protomen
  • 9,471
  • 9
  • 57
  • 124
  • @Mr.E. Thanks. +1 for you question – Protomen Jan 23 '14 at 18:16
  • There is [no HTML5 DTD](https://stackoverflow.com/q/4053917/2157640) and there will never be one. It’s impossible to write a DTD for HTML5, the same way it is [impossible to parse HTML via a regex](https://stackoverflow.com/a/1732454/2157640). – Palec Mar 01 '15 at 18:54