Tables
 
See the GOV.UK Elements guide for information on markup and styling for data tables.
 

Guidance

 
Not all data needs to be in a table
Tables are great when users need to compare sets of information, but be wary of writing out name / value pairs to a table for no reason - there's often a more compact way.
 
For example, this:
 
John Smith
32 Lancaster Drive
Lewisham
London
SE13 64T
 
not this:
 
Name
John Smith
Address 1
32 Lancaster Drive
Address 2
Lewisham
Address 3

Town
London
Postcode
SE13 64T
 
Right align numerical data in tables
 
 
 
This makes it easier to scan and compare values.
 
 
Choose a good sort order
Tables should be sorted in a way that's useful to the majority of users.
If there are use cases for different sort orders, consider implementing a sortable table.
 
Sortable tables
Sortable tables can be used to assist users in comparing data. Use clear link styles to indicate that the column titles are clickable, and an arrow to indicate the current column being sorted and direction of sort.
 
 
When sorting a column, choose a good default sort direction. Eg for 'number of applications' users are more likely to be interested in large to small than the reverse.
 
Unsortable values (eg blank cells or N/A) should appear at the end of the sorted table. [regardless of sort-direction? or only at the end when in descending order?]
 

Examples on GOV.UK