4 ms·
This is the "broken windows" effect in real life. "Google doesn't care, and these other sites don't care, so why should I care?" I have found that validation
by bphogan 11y ago
This is the "broken windows" effect in real life.
"Google doesn't care, and these other sites don't care, so why should I care?"
I have found that validation serves a very important purpose - to guide your development. I have lost count of the times I have encountered CSS with all sorts of extra junk because things didn't look right, and the reason for it was that the underlying HTML was invalid.
Yes, the browsers are smart. But they are still guessing. If you leave out a tag, the browser will close it for you. Not always in the right spot. Invalid pages could also result in a DOM tree that's not quite right, so JavaScript could be affected.
Developers should validate their pages just as they lint their code, to ensure quality.
Of course, if you're using cutting-edge elements, they won't validate. But that's a little different story. It's not a reason to not validate, it's just a reason to filter out those errors.
- insanebits 11y agoI do not agree with your point that you have to pass validation. First of all I don't say that you should leave unclosed tags for browser to figure out. Or doing something crazy to break things. Some of us still have to support older IE versions which needs to some workarounds to work with it. Even the validator.w3.org doesn't pass it's own validator. https://validator.w3.org/nu/?doc=https%3A%2F%2Fvalidator.w3.org https://validator.w3.org/nu/?doc=https%3A%2F%2Fvalidator.w3.... My point is that we need to use modern tools like html5 while still being backwards compatible with older browser which means breaking some w3c rules. Another valid case off the top of my head for breaking w3c(haven't tested if it passes validation) would be `<meta>` tags inside body tag. Which is part of the microdata format. Normally you're not supposed to put meta tags outside head but for while using mircrodata you sometimes have to rely on meta tags because your design doesn't allow for required(by microdata) to be shown on the website, so you use meta tag, which doesn't do any harm since it's not rendered for the user.
- ikeboy 11y agohtml doesn't give a (valid) way to be backward compatible? That sounds like a design flaw.
- wagglycocks 11y agoIt is a design flaw in the older browsers, not the spec itself. HTML hasn't changed in years, and XHTML is largely backwards compatible.
- fisadev 11y ago> This is the "broken windows" effect in real life. Had to point this out: windows are real, the broken windows effect is something from "real life".
- bphogan 11y agoYea it was poorly phrased, but so many people brush off the platitudes like "broken windows" in our industry.