Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

I meet web developers from different levels of experience and backgrounds and some of them like tables for everything. Divs are great and tables are to be used only when it is required.

Can anyone suggest some uses of tables which can't be achieved using divs. Also, what are the effects of using tables on the UX of a website?

share|improve this question

closed as off topic by JohnGB, rk., DA01, ChrisF, Benny Skogberg MCSA May 29 '13 at 7:59

Questions on User Experience Stack Exchange are expected to relate to user experience within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Pretty much everything can be achieved with divs (including tables), but that doesn't make them appropriate. As much as tables are to be used only when required, so are divs -- unless you like div soup. Is there any particular UX angle you are interested in? –  Brendon May 29 '13 at 5:21
1  
2  
There's strong arguments for not making everything a table, but it's not necessarily wrong in a general sense. Regardless, this isn't a UX question. Better asked on StackOverflow, perhaps. –  DA01 May 29 '13 at 5:35
    
What @DA01 said. I prefer mixing tables and divs! Table divs for cross browser compatibility is not (yet) always similar. –  Dirk May 29 '13 at 7:53
    
IIRC, IE also used to have an issue with the maximum number of div tags in a document. Not sure which version finally fixed this. Problem was tied to 32-bit code even though 64-bit versions existed. We found it because we were generating HTML and formatting with div instead of table. Large datasets broke on this maximum div count. –  cdkMoose Nov 14 at 18:59

2 Answers 2

Tables are best used if you're showing tabular data, and not for layout like many designers do. You could achieve this with DIVs, but if you consider compliance for accessibility, it's actually easier to send data within context for screen readers.

share|improve this answer
1  
"Compliance for accessibility" makes it sound like accessibility is just a box-ticking exercise. –  Brendon May 29 '13 at 5:25

There isn't anything that can only be achieved with TABLEs.

You can define CSS display property that makes DIVs to be tables/rows/cells with property values: table, table-caption, table-cell, table-column, column, table-column-group, table-footer-group, table-header-group, table-row and table-row-group.

All the developers just don't like to hassle with CSS layouts, since TABLE does the grid by default without too much adjusting. It's wrong use of the TABLE tag if the data isn't tabular.

Not sure how this question is about UX, but markup.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.