Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
johncmouser
· 6y ago · 0 comments
would you need the doctype if the user-agent said it was html5 compliant?
Comments
[–]
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
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.