Hacker News new | ask | show | jobs
by Aeolun 1396 days ago
> It’s not that you’re allowed to omit the head element (you’re not, and you can’t), but that its start and end tags are optional.

That’s like calling a cheese sandwich without any cheese a cheese sandwich.

3 comments

It's not a sandwich recipe. The bread doesn't matter. The cheese does.
If you omit writing <head> and </head> in HTML syntax, there will still be a head tag in the parsed result.

(This is different from XML syntax, where omitting the start and end tags means omitting the element as a whole so that there will be no head tag in the parsed result.)

I think they are saying HTML implies the <head> for you - the <title> is still required.