• There’s still a huge debate over the usage of tables verses divs in plugin development so I wanted to get other opinions on the subject. When developing a wordpress plugin, what would you rather use to be more usable with all the thousands of themes out there. Tables or divs and why?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Divs in the vast majority of cases. Tables should never be used for purely presentational purposes and they can be far harder to style than divs.

    Thread Starter myallenmedia

    (@myallenmedia)

    Is it also true that tables can cause different display issues under different themes? The idea is to have divs all working under all themes.

    Yes – in that the tables could be styled quite differently in the theme’s stylesheet. But then it would be quite reasonable to assume that the plugin’s display using divs might still need some tweaking in a random theme., I think the best bet us to use divs, apply some basic CSS that works when the plugin is used with the current default theme and let everyone else look after the CSS (if necessary) in their themes.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    There’s still a huge debate over the usage of tables verses divs

    Why? They serve different purposes and are both useful.

    They can both be misused.

    How can you misuse divs? They have no semantic meaning – unlike (say) table markup.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Using a div for the purpose of a table, or a table for the purpose of a div.

    Tables are for tabular data

    Thread Starter myallenmedia

    (@myallenmedia)

    All good info!

    Using a div for the purpose of a table

    Fair point ??

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    The fairer point was analysing what purpose a div has, made by you. It has no overall purpose, but only in the context of its usage, whereas a table has an overall purpose.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Tables verses Divs’ is closed to new replies.