6 ms·
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
by wwv25 6y 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.
- 7786655 6y agoUnquoted attributes are valid HTML.
- wwv25 6y agoJust 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.