Jason Knight
Nov 3, 2021

--

And making things all the more confusing, traditionally <div></div> is NOT what the HTML specification called empty... Made all the worse by their "clarifying" it by now calling them "void'... aka "nothing"

an IMG is not "nothing". BR is not "nothing".

In HTML 4/earlier a "empty" element is one that cannot wrap content, not one that has no content. Thus why <div /> is invalid XHTML even if it's valid XML.

It gets really confusing when HTML and CSS use the same terms for different things. Much like when some developers use classes or ID's that are the same as pseudo-states like "active".

--

--

Jason Knight
Jason Knight

Written by Jason Knight

Accessibility and Efficiency Consultant, Web Developer, Musician, and just general pain in the arse

No responses yet