3 ms·
> What a lot of developers need to understand is that HTML shouldn't be use for layout. HTML should be use for semantic and information structure. That was the
by TeMPOraL 8y ago
> What a lot of developers need to understand is that HTML shouldn't be use for layout. HTML should be use for semantic and information structure.
That was the great lie of the 2000s. It was oft repeated, but almost never adhered to. CSS Zen Garden was cool, but the typical attempt at "separating content from presentation" almost universally resulted in a div soup that was even worse than table layouts. If a div exists only to hang a class off it, so that it can be targeted in CSS, it's a part of layout, not semantic/information structure.
In a perfect world, in which most websites were not actively user-hostile, we could have separation of layout from content. It would include relinquishing control over rendering back to the users. It would require to stop obsessing so much over colors and layouts and custom controls. The very concept is anathema to the modern web, though.
- dmix 8y ago> If a div exists only to hang a class off it, so that it can be targeted in CSS, it's a part of layout, not semantic/information structure. Thanks, I've always thought this intuitively but never seen it written out. Just as any academic theory hitting the reality through actual implementation, the theory should be more of a guiding force instead of a rigid structure to follow. Much like how the military learned to plan battles (No battle plan ever survives contact with the enemy - Helmuth von Moltke the Elder) by giving troops higher-level objectives, rather than planning every single step of the attack, such as exactly where they should walk and hide, and expecting them to follow it to a T. This is how I approach most programming/web design theories... including BEM.
- Domenic_S 8y ago> div soup At my last job we called it "divarrhea"