Recommendations for a CSS validator? The W3C validator appears to be outdated.
Looking for a HTML and CSS validator tool, preferably for the whole website - Software Recommendations Stack Exchange
What's a good html validation extension for Firefox and Chrome?
Reddit, what are your thoughts on validation?
-
Both. Validation is a style of programming, not a feature-add
-
HTML. CSS, unfortunately, almost always requires hacks to get all browsers playing nice. And when you work on enterprise software and the CTO wants to know why his page looks different on his IE6 browser than everyone else who is using Firefox you give up and just add in some CSS hacks.
-
I'm usually not offended. Just disappointed. Kind of like when your parents tell you they're not angry, they're just disappointed.
-
It's just part of the package. I charge more than the average guy. As a result I attract only a certain kind of client. Usually these clients are the type to request things like validation.
-
If I own the content I'm surprised with a dash of disbelief. If the client owns the content I almost expect it not to validate.
Videos
My old standby, the W3C Validator, appears to be a bit out-of-date and doesn't support nested selectors.
I tried the csstree validator but it stops working when input contains CSS variables (e.g. --color: green).
I also tried the csstree-validator NPM package but it's choking on nested @media rules, which are a fairly recent addition.
What I'm really hoping for is an NPM package that can validate the CSS compiled by a static site generator, but even just something I could copy-paste into would be fine.
Any recommendations?
Edit: Actually, Stylelint seems like it'll do just fine, with the added advantage that we already use it in our projects for linting!
W3C Markup Validation Service: This is a well-known and widely used tool for validating HTML markup. It's available as a web service, and you can also download the source code and host it on your local environment. It can validate individual pages or entire websites by submitting a sitemap or list of URLs.
Visit https://validator.w3.org/
These days you likely want something like html-validator for a specific programming language, in this case Javascript, configured to scan output HTML/CSS files and hooked into CI for automated validation.
Unless of course there's some user input that can result in different HTML which would normally not be checked. In that case you can generate special test output just for tests and cover all the cases that need to be covered. Might not work for your website depending on what it is and what exactly you need to verify, but I'm mentioning it as the most optimal possibility for lots of more basic sites.