Hacker News new | ask | show | jobs
by wwv25 2153 days ago
The argument for using invalid HTML because many other websites implement invalid HTML is not a strong argument imo. Modern browsers are very forgiving in this regard but we and developers should still strive for consistency through explicitly defined values.
1 comments

Unquoted attributes are valid HTML.
Just checked for myself, and you're correct. OP could have shortened the post by 90% if they just pointed to this fact. But while technically valid, for any reasonable HTML document, you'll run into cases where quotes are required. Example:

    <div class=foo bar>
At which point, if you use quotes once in your document, you should really use them throughout.