Semantic CSS?

It is generally agreed (and widely ignored) that TABLE in HTML is a semantic element that should be used for organised data.

So, what exactly is an element that is styled with the CSS display:table rule?

Perhaps this is just nitpicking about names, but it seems to me that people want columns and grids for layout, and CSS 2.1 fails at columns but gives them an array of table-* stuff for grids, which really confuses the argument about using tables not for design but for semantics.

Or is the new role of CSS to actually subtly impose HTML4 semantics on random XML documents?


5 thoughts on “Semantic CSS?

  1. Yes, you are nitpicking. :)I don't see the point in replacing TABLE markup with DIV markup that is pushed inexactly the same table structure. It is not being used much because MSIE doesn't support it, but also because the HTML-version has more flexibility in presentation options (spanning), ironically.But there is nothing wrong with it either. CSS does not impose semantics [1], subtle or otherwise. Creating a page grid with 'display:table' actually means you explicitly say 'this is not a table, but just a page grid'.[1] Formal semantics that is. If you think about perceived semantics by the user of the site in a graphical browser, you can of course create something that makes a lot of 'sense' to the user with utterly meaningless markup behind it. That's been the forever. Writing code likep.header {font: bold 20px sans-serif;}has always been possible.

  2. I don't consider table a semantic element but a structural one. There could have been semantic table elements telling what kind of table the table is but that is not supported in HTML. I think dl probably would be better off as a structural element, but others prefer to see it as a semantic element that should be restricted to definition lists.Colums have always been tricky with the table model as part of the document tree (the rows are children of the row group children of the table). The column elements have been restricted to orphaned elements doing influence from afar. This gives CSS little to work on, as Ian has noted

  3. Finally, Ian's notes explain for me why Opera and Firefox don't support full styling of COL and COLGROUPS, but IE does. :up:That's also explain why CSS 3 still missing CSS Table module. ;)But why Opera still not support visibility: collapse on COL elements? Also :hover on COLs will be very appreciated. It's CSS 2.1 specs…As for "semantic" of CSS table-*. Personally, I think it has misguided name. I would name it CSS Grids instead of CSS Tables.For design purposes I probably would like have 2 kind of grids: horisontal (like table's rows) and vertical (group elements by columns).

  4. It would be nice if the implementation of CSS through "div" tags were consistant across browsers, but it isn't. Therefore, I continue to use tables to lay out pages, even though (for reasons which have been reiterated ad nauseaum) using tables as a styling tool is inconsistant with [any] markup specification.I, personally, would like to lay out pages using divisions which can be absolutely sized and postioned in relation to the author's choice of browser window, author-defined page dimensions, or relative to parent or ancestral block-level elements. Again, some of this works much of the time, and the W3C seemes to be working toward this happy state of affairs, but until this is worked out and, more importantly, implemented (hear THAT, Bill G??? You @#%*!in' moth*%$#@!#%???), well… I'll have to stick with whatever works. I'm not particularly militant about web standards, I guess…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s