Hacker News new | ask | show | jobs
by sheriffderek 3561 days ago
While we're at it, how about we lose the unnecessary uppercase for the doctype: <!DOCTYPE html> vs. <!doctype html>

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! :)

2 comments

Capital letters for the word 'doctype' are not mandatory for HTML, only for XHTML.

https://html.spec.whatwg.org/multipage/syntax.html#the-docty...

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".

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