3 ms·
> CSS-based layouts, done right, still leave the underlying HTML heavily semantic. Could you give an example? I've done "tables" in CSS, and most of the time y
by UnoriginalGuy 12y ago
> CSS-based layouts, done right, still leave the underlying HTML heavily semantic.
Could you give an example? I've done "tables" in CSS, and most of the time you're using DIV to manage most of the positioning, which is non-semantic.
If there was a CSS table replacement which defaulted back to something which looked like a table in HTML, I'd be impressed.
- JoshTriplett 12y agoIf what you're building is actually a table, use table markup; that's the semantically correct markup. Just don't use it for something like a sidebar or footer, or otherwise for positioning. If you're building a navigation area, a callout, or some similar semantically significant sidebar, take a look at https://html.spec.whatwg.org/multipage/dom.html#sectioning-content https://html.spec.whatwg.org/multipage/dom.html#sectioning-c... for the nav and aside elements. But even if you use a div, as long as the semantic content makes sense without the div, you're fine. For instance, put one div with your article content starting with an appropriate heading tag, and another div for your navigation. Without the CSS, it still makes sense to have a section for content and a section for navigation. Also, there is actually CSS markup to make something look like a table, if that's what you want; see http://caniuse.com/#feat=css-table http://caniuse.com/#feat=css-table for instance.