Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How else would you display data?


You're right, everything else I can think of is worse for data, tables are pretty good for that (minus the weird vertical centering thing that sometimes happens in cells.)

But seeing tables being used for layout annoys me far more than the blink tag.


> But seeing tables being used for layout annoys me far more than the blink tag.

How come? CSS positioning is pretty unintuitive, and sometimes it's just easier to get something working with tables. If the end results look fine, what's the problem? Table-based layouts aren't in-your-face like the blink tag was.

Oh, and don't view-source on HN ;)


When I rewrote the Coursera discussion forums and sent them through an accessibility audit, I was told to use <li>s instead of <div>s to represent the nested conversations, which makes a lot of sense when you think about it. Disqus also uses <li>s for their comments.

So, just FYI, if you find yourself generating HTML for something like HN anytime in your life.


I believe discouraging the use of tables for layouts is accessibility based. Screen readers have a really hard time parsing them correctly.


My problems are mostly how easy it is to get lost if you're dealing with nested tables within tables (especially inside templates), and that they have to be completely read before rendering... although that may no longer necessarily be an issue with modern browsers.

I find divs and spans easier myself but I guess, yeah, at the end of the day if it looks fine and it loads fine then it's fine. Too much pain from hand-coding too many tables has made me twitchy and curmudgeonly.

Oh, and don't view-source on HN ;)

Oh, i'm aware... It's just too bad html doesn't provide elements that handle nested lists. If only. Ah well.


Isn't <ol> <li> <ol> <///> Valid?


Yes, i was being sarcastic.


I've actually found CSS layout to be more intuitive than tables. maybe it's just that I have ages more experience with CSS than tables, but seriously, tables feel like a cludge for layout.


(views source)

as a <table> user, I feel vindicated :P


I'm using SlickGrid[1] in an internal tool. It uses divs and spans to display data, so there are certainly nice examples that do so.

1. https://github.com/mleibman/SlickGrid


But why would you want that? The whole point of moving from <table> to <div> for layout was that using <table> wasn't semantic and was the wrong tool for the job. But <table> is the right tool for displaying tabular data. That's its entire purpose for existing. Using <div> to display tabular data is a regression.

Edit: typo


I don't disagree, just pointing out that there are ways to achieve a tabular layout without an html table. Tables are for data right?

On the other hand, I like the idea of less and more generic constructs that can be adapted to achieve some need. Specialized tags like dd, address, details, summary, code, blockquote, etc just seem superfluous.




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

Search: