3 ms·
> HTML/CSS was supposed to separate content from looks. IMO the problem is that HTML is woefully inadequate for expressing the sort of content we have today on
by deergomoo 6y ago
> HTML/CSS was supposed to separate content from looks.
IMO the problem is that HTML is woefully inadequate for expressing the sort of content we have today on the web.
It’s a document container that we’ve shoe-horned an application platform into. Much of what is displayed on some of the most popular sites can’t even be described as “content”—it’s interface, and that’s where things fall down.
It’s hard to follow semantics when the only option you have is positioning and styling divs. In that regard the style becomes part of the content. Nested divs have no meaning, and there’s no way to give them meaning in the same way that <p> is a paragraph. Aria labels help on the accessibility front, but outside of that the only way to express meaning of something like a modal or a popover is visually.
- perilunar 6y ago> Nested divs have no meaning That's pretty much true now[1], but the original meaning of "div" was "document division"[2] — i.e. they were similar to the current "section" element. > outside of that the only way to express meaning of something like a modal or a popover is visually. That is (was?) the point of 'semantic' CSS and the separation of concerns. A div is (now) just a generic block, but a div with an id or a classname means something dammit. 1. https://html.spec.whatwg.org/#the-div-element https://html.spec.whatwg.org/#the-div-element 2. https://www.w3.org/TR/2018/SPSD-html32-20180315/#div https://www.w3.org/TR/2018/SPSD-html32-20180315/#div