Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
SahAssar
· 6y ago · 0 comments
The original post specifically mentions dropping the doctype which is not valid. It also implies that you can drop all (or at least many) closing tags without saying that some are optional and some are not.
Comments
[–]
johncmouser
6y ago
would you need the doctype if the user-agent said it was html5 compliant?
[–]
pzmarzly
6y ago
Without doctype, browsers will render your page in quirks mode, leaving you scratching your head because of margins being set out of nowhere.
https://developer.mozilla.org/en-US/docs/Mozilla/Mozilla_qui...
[–]
SahAssar
OP
6y ago
The doctype is required for it to be a valid html5 document.
[–]
recursive
6y ago
Yes. Especially then. Without a doctype, it's not html5.