WeBWorK Problems

DataTables vs LayoutTables for images and text?

DataTables vs LayoutTables for images and text?

by tim Payer -
Number of replies: 2
Hello,

I was hoping that someone could please tell me if there are specific advantages or disadvantages to using a DataTable instead of a LayoutTable to display explanatory text with images on a cell by cell basis.

I have been using DataTables almost exclusively as I can identify the image and its source and also adjust column widths to change the relative size of the cell holding an image.

But Recently in the Forum Pages a Layout Table was recommended for displaying several images. I have read the page comparing the two table types but would like to know if Layout Tables have any advantages to displaying images as it was recommended recently.

Is there a significant difference between these for image and text displays?

Thanks, Tim
In reply to tim Payer

Re: DataTables vs LayoutTables for images and text?

by Alex Jordan -
This site has a general overview of layout tables versus data tables:
http://webaim.org/techniques/tables/
It does a decent job of explaining the issue. It's not about advantages or disadvantages; it's about one being appropriate sometimes and the other other times.

If I had four images to display, I'd ask if the 2x2 grid is just a space saver or if it has true meaning. For instance, mages of Utah, Colorado, New Mexico, and Arizona which meet at Four Corners, could meaningfully be laid out in a 2x2 grid. So that could be a data table.

But laying out images of Alaska, Washington, Oregon, and California in a 2x2 grid would just be an artificial way to make them take less space, and there would be no important meaning to the (x,y)-position of any state. So that would be a layout table.

Another set of four images that would be good for a data table would be a Punnett suqare: https://en.wikipedia.org/wiki/Punnett_square. The (x,y)-position of an image really matters.
In reply to Alex Jordan

Re: DataTables vs LayoutTables for images and text?

by tim Payer -
Thank you Alex,

I had read the techniques page about the two tables but did not understand the meaning of "x,y" position without your descriptive example. That really help explain it to me, Thanks, Tim