Hacker News new | past | comments | ask | show | jobs | submit login
HTML tables are not evil. Using them is not a sin. They do not suck. (arclanguage.org)
3 points by whyme on Jan 26, 2011 | hide | past | favorite | 4 comments



I felt like that when learning XHTML+CSS in the HTML 4 days (when the most common question seemed to be 'Best layout method: iframes or tables?!'), and with IE 5.5 still being used a bit it was a big annoyance to switch over to XHTML and CSS.

But honestly, I now couldn't go back. I seldom run into any cross browser issues (apart from the odd IE 6 and 7 issue, which conditional comments takes care of in a minute or two), and I now couldn't imagine using tables for a layout.

But you're right that using HTML tables isn't evil. They're designed to display tabulated data and using them for this purpose is definitely a good plan ;-)


Not going to say I use them all the time but I sure do love me a good table. Just today I had to debug some code that was a css-simulated-table that went all wonky with its floats and clears.


Sure, until you need to print the page. Or show it on a iPad.


Sure, tables are not inherently evil. But like every other HTML element, they have their correct and incorrect uses. The reason you hear so much crap about them is because of very widespread misuse.

When used correctly (read: where you need to display tabulated data) tables are perfect. In some cases, they may even be warranted in layout design. However, this is not common. Using DIVs and CSS makes for much cleaner code where a table is not explicitly needed.

Hacker News actually uses tables. Not sure why, but maybe there's a good reason.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: