When we think of an html table element, we should really start seeing it for what it is, and not what it has been used for up until now.
The days of HTML 4 transitional should already be over as we pave the way for the newer and more manageable XHTML or HTML5. Future versions of HTML will not be versioned.
So where does this leave the infamous table element? Prior to XHTML the table element had been used for layout. A great deal of applications such as Photoshop still publish HTML and use table based layout.
The table element should only be used for the presentation of tabular data. This you might say is common knowledge, however I don’t think the Table, TR, TD element group is quite up to the task. If a table is really only supposed to be used for tabular data display, why not beef it up a bit.
Here are my recommendations which would complete the Table element, and give it a real place in the new HTML specification:
1. Give it the ability to resize columns easily via an attribute or style tag: <TD resizable=”x,y” or style=”resizable-x:true” />. Yes I know column resizing has been possible for a good few years already, but it is such a pain to implement the custom JS required to pull of this feat, why not have it standardized and included in the spec.
2. Sorting on headers: Add powerful new methods to give developers a way to sort tabular data right in the HTML spec, browsers should adhere.
3. Grouping with expand or collapse: This should really be part of the table out of box functionality. Very much like a server side grid control.
4. Alternating row style out of the box, which would mean more style applied to the Table element, rather than the TR or TD element.
5. The ability to add borders to the TR element – finally!
6. OOB Ajax population / Data binding to xml based web services.