3 ms·
I learned quite a lot by viewing the source of this delightfully clean and spartan website. You don't need a DOCTYPE tag? You don't need a head tag? You don'
by troymc 2y ago
I learned quite a lot by viewing the source of this delightfully clean and spartan website.
You don't need a DOCTYPE tag?
You don't need a head tag?
You don't need to declare the charset?
The body tag has a "background" attribute?
The HTML "center" tag still works?
- digging 2y ago> You don't need a DOCTYPE tag? > You don't need a head tag? > You don't need to declare the charset? True, there are many things you don't need for a page to be rendered in a typical browser, but that doesn't make them useless. For example, DOCTYPE has exactly one purpose: tell the browser not to treat your page like it was designed for ancient versions of Netscape Navigator or Internet Explorer, with all the "quirks" of their pre-standardization rendering engines.
- throwitaway1123 2y agoBrowsers are very lenient when it comes to HTML parsing. In fact, one of the reasons why HTML sanitization libraries like DOMPurify are so complex is because browsers will tolerate all sorts of twisted broken markup.
- TheHypnotist 2y agomarquee still works too
- drdaeman 2y agoIt's a good opportunity to tell the history of SGML, HTML, XML and XHTML (and possibly more, like long-forgotten SXML), and explain how we (the collective humanity) fu^W badly messed up our technology by following the path of least resistance because some (a lot of) lazy as^W folks can't be bothered to follow a bunch of simple rules.