Re:Google HTML/CSS style guide suggests omitting head and bo...
by alexhutcheson on Tuesday May 21, 2019 @12:13PM
(#19971568)
I think those elements still end up in the DOM regardless of whether you type them out explicitly. I might be mid-remembering though.
Re:Google HTML/CSS style guide suggests omitting head and bo...
by butz on Tuesday May 21, 2019 @12:18PM
(#19971622)
You are correct. Browser fills in missing tags, closes elements, etc. Try opening blank page in any browser and inspect it: you'll find html, head and body tags already placed in DOM.
Re:Google HTML/CSS style guide suggests omitting head and bo...
by ravenstine on Tuesday May 21, 2019 @12:23PM
(#19971665)
Ah yes, you're right. I forget a lot of those browser behaviors that haven't much consequence on my work.
Re:Google HTML/CSS style guide suggests omitting head and bo...
by edflsafoiewq on Tuesday May 21, 2019 @12:26PM
(#19971690)
There's a difference between a tag, which is a bit of concrete syntax like "<b>" or "</html>", and an element, which is basically a node in the DOM.
That's not to say that abolishing those tags isn't a great idea, but it would be harder than it looks for projects with an appreciable number of dependencies. I'm definitely in support of never writing that stupid <html> tag again.