Is there any good open-source Java library for HTML5 validation? It would be great if it did CSS 3 validation too. JTidy has not been maintained for a while.
Is there any good open-source Java library for HTML5 validation? It would be great
Share
The source code for both the W3C HTML and CSS validators is available, though only the CSS one is written in Java. The repo for validator.nu is here, that is written in Java.
However you should note that HTML5 validation is different to that for previous versions of HTML. Previous versions of HTML depended on a DTD and followed an SGML validation model, HTML5 no longer has a DTD or any link to SGML. It’s possible that what you want is not an HTML5 validator, but an HTML5 linter.