Divs vs tables for tabular data

前端 未结 6 1576
悲哀的现实
悲哀的现实 2020-12-06 12:21

Yes, another divs vs tables questions...

I read all over the place that \"try to use divs instead of tables\", but I have an application that displays data that is t

6条回答
  •  醉酒成梦
    2020-12-06 12:23

    No! If tables were not to be used at all for your code, they would have been taken out. Tables have a proper use, and that use is for tabular data! This is the time to use them (not for presentation or design). So by all means, use tables!

    I would recommend to provide a caption tag within your tables to give people who may be using screen readers (such as blind Web surfers) proper context, too.

    Example:

     
    ...
    

    Don't be afraid of current trends. Tables should be used for tabular data. You're doing it right :)

    Dive Into Accessibility offers a lot of helpful tips, as well.

    提交回复
    热议问题
    Corporate Information of Current Employees
    Jim Jones