|
|
|
|
|
by wodenokoto
4102 days ago
|
|
> what if that div only exists for the purposes of the grid layout? Those things aren't supposed to exist. HTML is supposed to look like: <div class="blogpost><h1> ...
<div id="mainmenu"> ...
We never got enough power in CSS to actually do that, and current frameworks are a return to the table based layout of the 90s where structure of the layout (not structure of the content) is stored in the HTML.If semantic in terms of HTML is ever thrown around meaning anything but description of the content, it is used wrong. The question about "semantic for what purpose" is moot when talking about HTML. It is semantic towards what information the content conveys. "Semantic HTML is the use of HTML markup to reinforce the semantics, or meaning, of the information in webpages rather than merely to define its presentation or look." https://en.wikipedia.org/wiki/Semantic_HTML The question of whether that is feasible to do with current technology is completely different, but it is too late to try and redefine semantic HTML. |
|
Everything is so loosey-goosey with HTML. HTML5 sectioning elements are a huge clusterfuck, no browsers utilize the document outline and screen readers primarily rely on ARIA roles. Google uses black magic to figure out what documents mean... so the "html can only contain information that defines the content" ship has sailed. You need to have divs in your html to achieve certain layouts. As long as those divs need to be there to serve that purpose, why not use class names that are related to the purpose you're using them for?
This is very different from table-based layouts. The <table> element does have a defined meaning! But div's do not... so using divs and styling them with CSS achieves proper separation of concerns. The label you use to describe them only has meaning to you (the designer/developer).