Offline html5 validator
Asked Answered
J

2

15

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?

Jackjackadandy answered 22/1, 2014 at 12:41 Comment(3)
Possible duplicate - #3586707?Katlynkatmai
I believe it is now recommended by w3, but I think not even have a lib available (dtd file or something).Nutria
@Katlynkatmai not appear to be duplicates, just seems to be offtopic.Nutria
B
9

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

Berardo answered 22/10, 2014 at 10:15 Comment(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 for usage examples.Necolenecro
To use vnu.jar to validate as you type ("on the fly") in the Atom editor, use the new linter-vnu Atom package (published today).Beyer
N
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

Nutria answered 22/1, 2014 at 13:1 Comment(2)
@Mr.E. Thanks. +1 for you questionNutria
There is no HTML5 DTD 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.Fumatorium

© 2022 - 2024 — McMap. All rights reserved.