humbads said:
That's a good point, but it is debatable as to whether or not it has
any practical value. Some people use Excel to store recipes, even
though it is 'supposed' to be for spreadsheets.
That is true, but I tend to debate the way things *should* be done, rather
than the way they *could* be done.
There are generally a miscellany of different approaches to solving a
problem which, to the untrained eye -- e.g. a typical visitor to a web
site -- may seem equally good.
But to the trained eye, some solutions have elegance and grace whereas
others are ugly hacks. The best solution to a problem, is the one that is
beautiful to the trained eye, because this pleases everyone. (The
untrained eye is happy with any solution.)
I didn't know that. At the same time, it is barely worth knowing since
a) IE does not support those table display properties, and b) those
properties skewer the simplicity of regular HTML.
In technical realms, beauty is gernerally associated with simplicity.
Simplicity is also a good thing for the bean counters -- a simple solution
is less likely to go wrong, and if it does, probably faster (hence cheaper)
to fix. Simplicity is good.
In the specific case of presenting information in a grid-like fashion, if
Internet Explorer support is required, a table may be the simplest
solution.
If Internet Explorer support is not required though, using CSS's table
display stuff can make your markup even simpler.
Consider a list of quotations and choose this simplest possible markup.
It's a list, so one of UL, OL or DL is probably good. The order of the
list is not important to the understanding of the list, and the list is
not a list of definitions, so UL is where we start.
<UL>
</UL>
For each quotation we add a list item. Still simple.
<UL>
<LI>"Either this man's dead or my watch has stopped!" Groucho Marx
<LI>"Veni, Vidi, Vici" Julius Caesar
</UL>
Now, take advantage of HTML's handy Q and CITE elements:
<UL>
<LI><Q>"Either this man's dead or my watch has stopped!"</Q>
<CITE>Groucho Marx</CITE>
<LI><Q lang="la">"Veni, Vidi, Vici"</Q>
<CITE>Julius Caesar</CITE>
</UL>
And add a little CSS magic:
UL { display: table }
LI { display: table-row }
Q,CITE { display: table-cell }
Simple and elegant. If you want to see what it looks like, point a CSS 2.x
compliant browser here:
http://examples.tobyinkster.co.uk/table-tricks/q