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.
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.
validator.nu is open source. No CSS parsing though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With