(Also if that comment exposes any ignorance I have, please forgive me and point it out so I can learn something!)
HTML clicked for me one day when I mentally decoupled the hypertext from the actual browser rendering. So many of us think HTML and imagine the point is to render a webpage. But HTML describes the semantics, topology, and content of a document. It’s 100% valid to “render” HTML in some other format like a PDF or an mp3.
https://github.com/mozilla/readability/blob/main/Readability...
CSS doing the "rendering," like laying out mobile-responsive versus desktop.
I wonder how we would separate out explicit class names from HTML, unless the tags themselves are <custom-names />. (Micro frontends & web components?)
Then it sort of works out nicely, I think.
> HTML is the semantics ... the element tag to say "what it is"
Maybe this is best framed as a perspective thing.
"Semantic HTML" is about HTML authors using HTML elements in a way that is consistent with the definitions laid out in the specs. These definitions try to specify element semantics because user agents want to be able to do less-dumb things (things that don't work as well if HTML authors are constantly abusing tags for some presentational effect even though the semantics are weird or wrong).
The main consequence of this is that tag semantics (from the UA's perspective) won't always square with what the author assumes it means unless they go study the spec. For example, it's probably not hard to go find cases where the <address> tag is used for the obvious thing from the author's perspective: marking up addresses. The spec, however, explicitly contradicts this surface-level reading: https://html.spec.whatwg.org/multipage/sections.html#the-add... (i.e., it can be "correct" for pages to contain a mix of addresses that do and don't have the address tag.)
1990s web, with flashing tags and just infant monkeys trying to cobble together a webpage?
Your comment brings so many images to mind.
We can still do flashing tags and cobble together webpages; all we need is a text editor.
That's one allure of programming: we can (re)invent primitives of everything, for better or worse.
¹ With CSS and Javascript