Re:Google HTML/CSS Style Guide – Omit Optional Tags
by wanda on Saturday September 17, 2016 @06:53PM
(#12522949)
Capital letters for the word 'doctype' are not mandatory for HTML, only for XHTML.
https://html.spec.whatwg.org/multipage/syntax.html#the-docty...
Re:Google HTML/CSS Style Guide – Omit Optional Tags
by scrollaway on Saturday September 17, 2016 @04:32PM
(#12522313)
Yes, think about all those bytes we could save by not sending doctype as uppercase!
In XML, it's required uppercase. Unlike HTML being lax on tag structure, there is no reason to advise DOCTYPE to be lowercase. It's not "better".
Re:Google HTML/CSS Style Guide – Omit Optional Tags
by sheriffderek on Saturday September 17, 2016 @05:11PM
(#12522475)
I'm not actually fighting for it... or talking about bytes. I care more about keystrokes. My fingers seem to prefer lowercase. OTHERWISE I can just SOMETIMES write THINGS in weiRD cASEe FOR no REASON.. but I have to hold shift or use caps-lock and "I'd prefer not to." https://www.youtube.com/watch?v=U-9tAqdd_4Y
Leaving out optional tags makes sense. These days, at least with web-apps, It's not like we are writing a <head> for every page. It's just a partial you rarely ever interact with anyway. Either leave them in or take them out. The only negative I could see is that some people may not know what's optional–think you're a dummy–and put them back in. Probably best to just follow the conventions of whatever framework you use. Save your fighting energy for trailing commas in JSON! :)