4 ms·
Ask HN: Why is there no strict HTML 5 DTD?
Ran into an issue earlier today that, in a round about way, turned out to be due to Chrome automatically closing some unclosed tags. I admittedly should have caught it much earlier, but it did get me thinking - why is there no strict DTD for HTML 5? Couldn't find any discussions around this so was just curious if anyone here has some direct knowledge. Thanks!
- Tomte 11y agoIn earlier HTML versions "strict" did not force you to put in optional end tags. It simply disallowed some deprecated stuff.
- nness 11y agoIt might be in part to the differing goals of the W3C and WHATWG. To simplify, W3C wanted to stick with versioned specifications like they have always done and to finalise the HTML5 standard at some point and work on HTML6 or whatever came next. WHATWG saw HTML as transformative and wanted to create a standard that both established a future direction and took implementation specifics from vendors into a single "living" specification. DTD's seem to concern XHTML more than HTML, and WHATWG seems to have mostly dismissed the issue of parity between XHTML and HTML. WHATWG wants to treat the DOCTYPE as optional anyway, and is only including it for legacy reasons. This Stackoverflow answer goes into some good detail: http://stackoverflow.com/a/15245834/132164 http://stackoverflow.com/a/15245834/132164