Chapter 6. Tabular Data
Have you ever found yourself at a train station in another country, unable to decipher the rows and columns of a train schedule? What information do you rely on to determine the departure platform? Departure time? Connections? This chapter is about ensuring that information is available without the spatial cues that tables provide.
When information about a data cell is programmatically determinable, software can extract and present the information in multiple ways. For example, you can generate a chart from a data table and vice versa. (See http://www.wait-till-i.com/2008/01/08/generating-charts-from-accessible-data-tables-using-the-google-charts-api/ for an interesting take on the possibilities.) You can add a script that sorts or queries the table and provide a window into the data that can shrink, expand, or be spoken. In this chapter, we will discuss how to use tables to present data in a clean, reusable manner.
One thing to note as we begin: we do not discuss how to use tables for layout. These kinds of tables are of virtually no use to us in modern design now that CSS is widely supported. In fact, outside of HTML email, which is only beginning a long journey toward standards compliance, nearly any use of layout tables these days is unnecessary. As far as layout tables go, our advice is simple: don’t use them.
Data Table Basics
The primary goal of marking up tables is to ensure that relationships between cells are programmatically determinable. The secondary ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access