HTML tables
- Started
- Last post
- 36 Responses
- kalkal
I want to create a table on my site with prices.
So, everyone hates html tables these days, for layout at least.
Is it still acceptable to use them for what they
actually are? A table?Also, they're very tried and tested but are there any quirks to be aware of in general or specific to particular browsers?
Is there a better alternative to using tables at all?
Thanks.
- ukit0
Tables are absolutely acceptable for exactly that kind of data. Nothing wrong with tables, they just got overused for page layout back in the early days of web design.
- TheBlueOne0
If it's tabular data, you use a table. That's semantic.
Proceed.
- kalkal0
Okie dokey.
I've totally forgotten how to use them so I shall proceed to google how to do so.
- logi0
<table>
<tr><th>Uno</th><th>Two</th><th>3</th></tr>
<tr><td>I'd</td> <td>use</td> <td>divs</td></tr>
<tr><td>tables</td> <td>are</td> <td>icky</td></tr>
<tr><td>tabular</td> <td>data?</td> <td>yes</td></tr>
<tr><td>absolutely</td> <td>necessary?</td> <td>no</td></tr>
<table>
- logi0
er...
<table>
<tr><th>Uno</th><th>Two</th><th>3</th></tr>
<tr><td>I'd</td> <td>use</td> <td>divs</td></tr>
<tr><td>tables</td> <td>are</td> <td>icky</td></tr>
<tr><td>tabular</td> <td>data?</td> <td>yes</td></tr>
<tr><td>absolutely</td> <td>necessary?</td> <td>no</td></tr>
</table>:D
- So how does a blind person understand data in a bunch or random divs?seeessess
- Stugoo0
You could use a definition list.
But without seeing the data I think that a table might be the best bet.
http://www.communitymx.com/conte…- no... use a table for tabular data.animatedgif
- pipe down.Stugoo
- ernexbcn0
Tables are OK for tabulated data, go ahead.
- slappy0
You could use a data grid.
Just kidding, customise the padding etc in the css if you want to keep it tidy.
- fugged0
- <tr> ?mikotondria3
- lol. oops. yes...fugged
- <td>jadrian_uk
- uglyjadrian_uk
- i wouldn't say you're ugly, but then I've never seen you.fugged
- SoulFly0
Tabes are sooo 1990's
- Gordy220
This is pretty old but still useful: http://veerle-v2.duoh.com/blog/c…
- Gordy220
You should use tables for what you need here
- mikotondria30
put the data into excel, take a screenshot, upload it.
As a bitmap, with the dimensions incorrect.
font="MS Pincho"</td>
- ETM0
Just to add my voice to this masses... use a table for tabular data.
Creating a bunch of divs and stylizing them to look like a table is the most ridiculous thing I have ever seen. Anyone who does this, IMO, is someone who truly does not understand HTML, web standards and accessibility, and instead just reads blogs from 2004 for all their info .
- TheBlueOne0
*waits for Boz to show up and say "You should do it in Flash"
- logi0
seeessess,
re: "So how does a blind person understand data in a bunch or random divs?"
I just downloaded a screen reader and my div rows are being read in the same as the tabular data i recreated to mimic div rows.
so i guess everyone can say you need tables for tabular data, but experience shows there is no difference to a table and a proper div array recreating a table appearance when read back by the screen reader.
I found the following to be true. "Here is a simple rule of thumb to follow: Screen readers always read the text in the literal order that it appears in the code..."
- The difference is that one is semantic and the other isn't.TheBlueOne
- logi0
TheBlueOne,
what do you mean semantic?
it validates and is properly coded, i think all you mean is "recommended practices".
the same info reads back in the same order with the same appearance.
so despite the forceful nature to push tables, the same content can be displayed with divs to the same effect as tables with no ill affects to screen reader capabilities.
- Take away your style sheet and tell us how those divs look.ETM
- Data in a table remains intact regardless of styling.ETM
- Welcome to The Semantic Web™.
Where things are marked up so because that's what they mean.
mikotondria3 - Go back to trolling with the other libertarians, apparently web design is something you don;t understandTheBlueOne
- ETM0
^ But why the hell would you not use the tool CREATED for the purpose. I can't fathom how 'Don't use tables for layout' became 'Don't use tables for their proper and intended purpose.' Bloody laughable.
- I can use a butter knife to tighten a screw, but I prefer a screwdriver as it was CREATED for the purpose.
ETM
- I can use a butter knife to tighten a screw, but I prefer a screwdriver as it was CREATED for the purpose.
- bliznutty0
use percentages for widths and no-wraps for readability.. this makes your table dynamic to window/screen size