blakewatson / htmlforpeople

Web book about how to make a website with HTML.
https://htmlforpeople.com
Other
208 stars 7 forks source link

HTML5 doesn't require html, head, or body tag #11

Closed singpolyma closed 8 hours ago

singpolyma commented 9 hours ago

It's your book so if you want those in there for a reason I get it :) But I was surprised to see this since it's basically just boilerplate noise and not actually required to be valid HTML5. The doctype line is required if you want to pass validation so it may still be useful to indicate that line should be included for "just because" reasons. Of course if you just want to lead people to the head/body style that's fine too of course, I'm just bringing it up for discussion :)

blakewatson commented 8 hours ago

@singpolyma I didn’t realize it was valid to omit those tags. That’s kind of cool. I’ll probably leave that stuff in since most tutorials and docs will reference them. But that’s good to know. Thanks!