HTML tables
- Started
- Last post
- 36 Responses
- ETM0
IMO the following demonstrates a fundamental lack of understanding:
"css gives you more control. In my work do I rarely ever make a "table" of a few rows. everything is back end fed out to hundreds if not thousands of rows so I code for end appearance."
- ernexbcn0
If you don't use tables for shit that is supposed to go in a table you are not doing your job properly.
- inteliboy0
"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." Ukit. First post of this thread.
- ukit0
Basically the idea is that every piece of markup is supposed to be appropriate to its content.
The thing is that in reality there are few elements that are all that useful for adding meaningful markup to a document. So people basically ended up using divs for everything.
HTML5 will be much different and you will end up coding something more like:
<body>
<header>
<h1>logo</h1>
</header>
<section>
<header>
<h1>section name</h1>
</header>
<p>content</p>
</section>
<footer>
copyright 2011
</footer>
</body>
- 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 .
- fugged0
ffs, are we really debating if a table should be used to display tabular data?
not using a table to display tabular data is about as retarded as using a table to layout a page.
- Yes. And look at the asshats who are arguing against using them for their intended purpose.TheBlueOne
- logi0
ETM, you obviously have a lack of understanding yourself. I'm 11 years into this. tabular data in divs or tables are the least of my problem, you see them more often than you know. I agree with fugged on the absurdity of the argument. All I've done is state my opinions and practices, as I had stated previously as well.
- ukit0
Still, the best option is always gonna be code that someone (whether human or a search engine, etc) can read and interpret without styling. Imagine someone received your HTML doc without any stylesheet, would it make more sense to use tables or divs?
If you read the HTML spec, it says to use divs as a last resort now. Only when no other element is appropriate (and in HTML5 there are so many other options you'll use them much more rarely).
- vaxorcist0
I wish this religious war was over....
- jadrian_uk0
use divs with css display:table
- monNom0
^use spans with display first set to block, then to table.
- 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
Semantic means "meaning" - using tables in markup imply the data in them has a particular structure/meaning in it's presentation regardless of style. Putting tabular data in divs presents the problem of it losing meaning if the style is lost.
I'm not quite sure how you can justify using divs for tabular data.
There are tons of workarounds in web design when you have to go with what works as the lesser of all evils, but this is definitely not one of them. I can't believe there are those here arguing this point.
- 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.