Nothing Wrong With The Good Old Table Tag

Terry asks:

Do you know of any good sites/tutorials that show how to display a ColdFusion query result using css instead of tables?

My answer was simple - Why? I think too many people get caught up in the hype of CSS and think we should abandon all usage of the good old <table> tag. I completely disagree with this sentiment. I think tables should be used for what they're good for - displaying tabular data. What is a query? Tabular data. Besides that fact that it's definitely appropriate, I think it would be a complete pain to try to build a "table" with divs and spans,etc. Use css to style the table, but for goodness sakes use that table!



Comments
Todd,
Good post and point! I agree with you that there is nothing wrong with <tables> and they have their place. Add the fact that you can use CSS to style them up makes them all the more friendly to use. I did however have to blog about your post... send a brother some hits will ya???

http://ev.instantspot.com/blog/index.cfm/2006/10/1...

Ryan
# Posted By Ryan Everhart | 10/17/06 10:17 AM
Don't forget to mention the CFTABLE tag:

http://www.cfquickdocs.com/?getDoc=cftable

While not perfect, it'll build your output for you :)
# Posted By Christopher | 10/17/06 10:28 AM
I always smile to myself when I get asked that question. The answer is to use a table to display tabular data. But still use proper table markup. Use the groupings thead, tfoot and tbody correctly. Use th for your headings and relate them to the cells using the scope attribute. When you do that, it is not only easier to style using CSS, but you make the tables have more meaning to those who have to listen to your tabular data rather than seeing it.
# Posted By Sandra Clark | 10/17/06 2:11 PM
IMHO table tags are also more SEO friendly compared to CSS. It is easier to see the link between different columns from a crawler point of view. Of course, by the time you build 1 'table' with div and spans, you will have build 10 tables with table tag. Sometimes its just able getting the job done . =)
# Posted By shunjie | 10/17/06 8:50 PM
Actually tabled layouts (which I am assuming you are talking about) are not SEO friendly at all, when you build tabled layouts, you are building visually, rather than using a structured paradigm. Using structural HTML, actually creates a more usable, and crawlable site than tables. Remember, search engines are blind. They can only deal with what is in the HTML code and your content. Structured HTML consistently gets placed higher on a search engine than a old style tabled layout.
# Posted By Sandra Clark | 10/17/06 9:18 PM
Thanks for the discussion on this. I asked this same question to a coworker just yesterday.
# Posted By RickyBobby | 10/18/06 2:07 PM

Calendar

Sun Mon Tue Wed Thu Fri Sat
   1234
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Subscribe

Enter your email address to subscribe to this blog.

Tags

actionscript ajax blogging cfsnippets coldfusion flash forms flex funny stuff javascript misc model-glue off topic personal project learn slidesix sql

Recent Comments

Chinese Birth Calendar Accuracy Test
mama to be said: ok so i will be 2 months shy of 18 when i have my baby. this calendar does not technically work for ... [More]

Fixing 'User Profile Service Failed The Logon' on Vista
Mike said: That fix worked although all i did was remove .bak and reset state to 0. User was able to log in to... [More]

Chinese Birth Calendar Accuracy Test
Melissa said: Wrong for my daughter, which it predicted to be a boy... we'll see for #2. Predicts a girl (maybe, f... [More]

Adding Auto Generated Code Downloads to BlogCFC
fweerw said: http://www.ibiblio.org/st... http://www.cambodia.ait.a...... [More]

Check Out The New SlideSix
Todd Sharp said: Thanks for the feedback Ben & Rachel! I'll keep it all in mind as I tweak things over the next ... [More]

RSS


adobe community experts

coldfusionbloggers

FullAsAGoog MXNA

Consumed By Feed-Squirrel.com