Coolness is like trust. It’s hard to earn and easy to lose.
Update: Others seem to have finally gotten why this is more than just an IP issue.
Coolness is like trust. It’s hard to earn and easy to lose.
Update: Others seem to have finally gotten why this is more than just an IP issue.
In this post I’ll go into the semantics of tables. Tables are still hated by many web developers and since sometimes a firm ‘NO’ is the best way of changing things some people are still scared of using them. I’ll say it out loud:
Using tables in HTML is OK.
That is if you’re using them for tabular data. Some things are a table no matter what. To rephrase – if it looks like a table it IS a table.
The table is a block level element so it goes anywhere a block level element can. It can even fit inside the button element.
Every table begins with a table tag. Needless to say that the table needs to be opened and closed.
<table>
The table element can have attributes. One of them that should be user more often is summary that describes the contents of the table. There are a few attributes that actually control the display of the table and should probably not be used, or at least be used as little as possible. These are all still valid even in XHTML1 strict: frame, rules, cellspacing, cellpadding, width and border. Align and bgcolor attributes were dropped in strict and should not be used anymore. You can achieve almost everything that the last two groups of attributes are there for with CSS. You might stumble upon some problems though.
The regular attributes apply, a special case is the dir attribute that sets the direction of the table. With tables right-to-left (RTL) means the first cell will be on the right and the text will start on the right.
Before we get to the content of the tables we need to check some other tags.
<caption>
The caption tag is used to “describe the nature of the table
“. The caption element is visible to all users and should be rendered as wide as the table. With the summary attribute it should provide all the information about the table to people using non visual renderers. There can only be on caption element and it has to be the first child in the table element (ignoring whitespace nodes of course).
There are some issues with rendering the caption though:
Read more about styling table captions.
In the next edition of the tables we’ll go into rarely used colgroup and col tags.
There’s been a lot of buzz lately about the development of HTML. There’s WHATWG developing the Web Application 1.0 specification also referred to as HTML 5 or XHTML5. The document is edited by Ian Hickson and copyrighted by Apple, Mozilla and Opera. On the other side there’s a W3C group working on XHTML2 (the old HTML WG) and then there’s talk of a new group that would work on incremental improvements of both HTML and xHTML. There’s a nice comparison available here (via Juicy Studio Colour Contrast Analyser).
The last fight “we” fought was “against” the browser makers. The browsers were going in different directions and something needed to be done. Fortunately the solution was a relatively easy one – set a standard and make/beg the vendors to create browsers that respect it. Not an easy task but it seems “we” succeeded. By “we” I mean web developers in general, the WaSP and the W3C. The standards support is not perfect yet, but it’s good enough that we are left without an enemy.
The unfortunate thing is that most people actually need an enemy. At work it’s probably their boss; at home it’s their mother-in-law… We keep making up new enemies – they give us the drive to give more than we normally do, create new things. And sometimes we just really don’t like what “the enemy” is (not) doing. I see this happening now in the world of web standards. We have many initiatives on a few fronts – we’ve got the WCAG issue and the HTML issue. It seems that on one side we have the W3C and on the other the real-life web developers community. Or do we?
As I see it we’re all on the same side. We need to figure out what to do next. And this unfortunately cannot be a democratic decision. Committees can agree on a solution but can’t really make a decision. Think about it – all the stuff we use now has a name to it. Somebody went over the line to set something as they thought it was right. The question is who that person should be now.
The trick is we will never know. We can just hope that again we’ll gain more than we lose.