Tables
These examples are used for automated tests and may not follow service manual best practice.
Tables default
Open this example in a new tab: Tables default
| Skin symptoms | Possible cause |
|---|---|
| Blisters on lips or around the mouth | Cold sores |
| Itchy, dry, cracked, sore | Eczema |
| Itchy blisters | Shingles, chickenpox |
Code
Markup
<table class="nhsuk-table">
<caption class="nhsuk-table__caption nhsuk-table__caption--m">
Impetigo can look similar to other skin conditions
</caption>
<thead class="nhsuk-table__head">
<tr class="nhsuk-table__row">
<th scope="col" class="nhsuk-table__header">
Skin symptoms
</th>
<th scope="col" class="nhsuk-table__header">
Possible cause
</th>
</tr>
</thead>
<tbody class="nhsuk-table__body">
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
Blisters on lips or around the mouth
</td>
<td class="nhsuk-table__cell">
Cold sores
</td>
</tr>
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
Itchy, dry, cracked, sore
</td>
<td class="nhsuk-table__cell">
Eczema
</td>
</tr>
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
Itchy blisters
</td>
<td class="nhsuk-table__cell">
Shingles, chickenpox
</td>
</tr>
</tbody>
</table>
Macro
Tables reverse default
Open this example in a new tab: Tables reverse default
| Skin symptoms | Possible cause |
|---|---|
| Blisters on lips or around the mouth | Cold sores |
| Itchy, dry, cracked, sore | Eczema |
| Itchy blisters | Shingles, chickenpox |
Code
Markup
<table class="nhsuk-table nhsuk-table--reverse">
<caption class="nhsuk-table__caption nhsuk-table__caption--m">
Impetigo can look similar to other skin conditions
</caption>
<thead class="nhsuk-table__head">
<tr class="nhsuk-table__row">
<th scope="col" class="nhsuk-table__header">
Skin symptoms
</th>
<th scope="col" class="nhsuk-table__header">
Possible cause
</th>
</tr>
</thead>
<tbody class="nhsuk-table__body">
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
Blisters on lips or around the mouth
</td>
<td class="nhsuk-table__cell">
Cold sores
</td>
</tr>
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
Itchy, dry, cracked, sore
</td>
<td class="nhsuk-table__cell">
Eczema
</td>
</tr>
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
Itchy blisters
</td>
<td class="nhsuk-table__cell">
Shingles, chickenpox
</td>
</tr>
</tbody>
</table>
Macro
Tables responsive
Open this example in a new tab: Tables responsive
| Age | How much? | How often? |
|---|---|---|
| 3 to 5 months (weighing more than 5kg) | 2.5ml | Max 3 times in 24 hours |
| 6 to 11 months | 2.5ml | Max 3 to 4 times in 24 hours |
| 1 to 3 years | 5ml | Max 3 times in 24 hours |
| 4 to 6 years | 7.5ml | Max 3 times in 24 hours |
| 7 to 9 years | 10ml | Max 3 times in 24 hours |
| 10 to 11 years | 15ml | Max 3 times in 24 hours |
| 12 to 17 years | 15ml to 20ml | Max 3 to 4 times in 24 hours |
Code
Markup
<table class="nhsuk-table-responsive" role="table">
<caption class="nhsuk-table__caption nhsuk-table__caption--m">
Ibuprofen syrup dosages for children
</caption>
<thead class="nhsuk-table__head" role="rowgroup">
<tr class="nhsuk-table__row" role="row">
<th scope="col" class="nhsuk-table__header nhsuk-u-width-one-half" role="columnheader">
Age
</th>
<th scope="col" class="nhsuk-table__header nhsuk-u-width-one-quarter" role="columnheader">
How much?
</th>
<th scope="col" class="nhsuk-table__header nhsuk-u-width-one-quarter" role="columnheader">
How often?
</th>
</tr>
</thead>
<tbody class="nhsuk-table__body">
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Age </span>3 to 5 months (weighing more than 5kg)
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How much? </span>2.5ml
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How often? </span>Max 3 times in 24 hours
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Age </span>6 to 11 months
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How much? </span>2.5ml
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How often? </span>Max 3 to 4 times in 24 hours
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Age </span>1 to 3 years
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How much? </span>5ml
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How often? </span>Max 3 times in 24 hours
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Age </span>4 to 6 years
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How much? </span>7.5ml
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How often? </span>Max 3 times in 24 hours
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Age </span>7 to 9 years
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How much? </span>10ml
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How often? </span>Max 3 times in 24 hours
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Age </span>10 to 11 years
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How much? </span>15ml
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How often? </span>Max 3 times in 24 hours
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Age </span>12 to 17 years
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How much? </span>15ml to 20ml
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How often? </span>Max 3 to 4 times in 24 hours
</td>
</tr>
</tbody>
</table>
Macro
Tables reverse responsive
Open this example in a new tab: Tables reverse responsive
| Age | How much? | How often? |
|---|---|---|
| 3 to 5 months (weighing more than 5kg) | 2.5ml | Max 3 times in 24 hours |
| 6 to 11 months | 2.5ml | Max 3 to 4 times in 24 hours |
| 1 to 3 years | 5ml | Max 3 times in 24 hours |
| 4 to 6 years | 7.5ml | Max 3 times in 24 hours |
| 7 to 9 years | 10ml | Max 3 times in 24 hours |
| 10 to 11 years | 15ml | Max 3 times in 24 hours |
| 12 to 17 years | 15ml to 20ml | Max 3 to 4 times in 24 hours |
Code
Markup
<table class="nhsuk-table-responsive nhsuk-table-responsive--reverse" role="table">
<caption class="nhsuk-table__caption nhsuk-table__caption--m">
Ibuprofen syrup dosages for children
</caption>
<thead class="nhsuk-table__head" role="rowgroup">
<tr class="nhsuk-table__row" role="row">
<th scope="col" class="nhsuk-table__header nhsuk-u-width-one-half" role="columnheader">
Age
</th>
<th scope="col" class="nhsuk-table__header nhsuk-u-width-one-quarter" role="columnheader">
How much?
</th>
<th scope="col" class="nhsuk-table__header nhsuk-u-width-one-quarter" role="columnheader">
How often?
</th>
</tr>
</thead>
<tbody class="nhsuk-table__body">
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Age </span>3 to 5 months (weighing more than 5kg)
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How much? </span>2.5ml
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How often? </span>Max 3 times in 24 hours
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Age </span>6 to 11 months
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How much? </span>2.5ml
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How often? </span>Max 3 to 4 times in 24 hours
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Age </span>1 to 3 years
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How much? </span>5ml
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How often? </span>Max 3 times in 24 hours
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Age </span>4 to 6 years
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How much? </span>7.5ml
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How often? </span>Max 3 times in 24 hours
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Age </span>7 to 9 years
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How much? </span>10ml
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How often? </span>Max 3 times in 24 hours
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Age </span>10 to 11 years
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How much? </span>15ml
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How often? </span>Max 3 times in 24 hours
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Age </span>12 to 17 years
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How much? </span>15ml to 20ml
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">How often? </span>Max 3 to 4 times in 24 hours
</td>
</tr>
</tbody>
</table>
Macro
Tables responsive and custom HTML
Open this example in a new tab: Tables responsive and custom HTML
| Name | Type | Description |
|---|---|---|
| id | string | The ID of the table. |
| rows | array | Required. The rows within the table component. See macro options for rows. |
| head | array |
Can be used to add a row of table header cells (<th>) at the top of the table component.
See macro options for head.
|
| caption | string | Caption text. |
| captionClasses | string | Classes for caption text size. Classes should correspond to the available typography heading classes. |
| firstCellIsHeader | string |
If set to true, the first cell in each row will be a table header (<th>).
|
| classes | string | Classes to add to the table container. |
| attributes | object | HTML attributes (for example data attributes) to add to the table container. |
Code
Markup
<table class="nhsuk-table-responsive" role="table">
<caption class="nhsuk-table__caption">
Nunjucks macro options
</caption>
<thead class="nhsuk-table__head" role="rowgroup">
<tr class="nhsuk-table__row" role="row">
<th scope="col" class="nhsuk-table__header" role="columnheader">
Name
</th>
<th scope="col" class="nhsuk-table__header" role="columnheader">
Type
</th>
<th scope="col" class="nhsuk-table__header" role="columnheader">
Description
</th>
</tr>
</thead>
<tbody class="nhsuk-table__body">
<tr class="nhsuk-table__row" role="row">
<th scope="row" class="nhsuk-table__header" role="rowheader">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Name </span>id
</th>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Type </span>string
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Description </span>The ID of the table.
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<th scope="row" class="nhsuk-table__header" role="rowheader">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Name </span>rows
</th>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Type </span>array
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Description </span><span><strong>Required.</strong> The rows within the table component.
<a href="#/macro-options">See macro options for rows</a>.</span>
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<th scope="row" class="nhsuk-table__header" role="rowheader">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Name </span>head
</th>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Type </span>array
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Description </span><span>Can be used to add a row of table header cells (<code><th></code>) at the top of the table component.
<a href="#/macro-options">See macro options for head</a>.</span>
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<th scope="row" class="nhsuk-table__header" role="rowheader">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Name </span>caption
</th>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Type </span>string
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Description </span>Caption text.
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<th scope="row" class="nhsuk-table__header" role="rowheader">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Name </span>captionClasses
</th>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Type </span>string
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Description </span>Classes for caption text size. Classes should correspond to the available typography heading classes.
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<th scope="row" class="nhsuk-table__header" role="rowheader">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Name </span>firstCellIsHeader
</th>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Type </span>string
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Description </span><span>If set to <code>true</code>, the first cell in each row will be a table header (<code><th></code>).</span>
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<th scope="row" class="nhsuk-table__header" role="rowheader">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Name </span>classes
</th>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Type </span>string
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Description </span>Classes to add to the table container.
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<th scope="row" class="nhsuk-table__header" role="rowheader">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Name </span>attributes
</th>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Type </span>object
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Description </span> HTML attributes (for example data attributes) to add to the table container.
</td>
</tr>
</tbody>
</table>
Macro
Tables with empty items
Open this example in a new tab: Tables with empty items
| Date | Vaccine |
|---|---|
| 10 July 2024 | RSV |
Code
Markup
<table class="nhsuk-table">
<caption class="nhsuk-table__caption nhsuk-table__caption--m">
Vaccinations given
</caption>
<thead class="nhsuk-table__head">
<tr class="nhsuk-table__row">
<th scope="col" class="nhsuk-table__header">
Date
</th>
<th scope="col" class="nhsuk-table__header">
Vaccine
</th>
</tr>
</thead>
<tbody class="nhsuk-table__body">
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
10 July 2024
</td>
<td class="nhsuk-table__cell">
RSV
</td>
</tr>
</tbody>
</table>
Macro
Tables with first cell as header
Open this example in a new tab: Tables with first cell as header
| Day of the week | Opening hours |
|---|---|
| Monday | 9am to 6pm |
| Tuesday | 9am to 6pm |
| Wednesday | 9am to 6pm |
| Thursday | 9am to 6pm |
| Friday | 9am to 6pm |
| Saturday | 9am to 1pm |
| Sunday | Closed |
Code
Markup
<table class="nhsuk-table">
<thead class="nhsuk-table__head">
<tr class="nhsuk-table__row">
<th scope="col" class="nhsuk-table__header">
Day of the week
</th>
<th scope="col" class="nhsuk-table__header">
Opening hours
</th>
</tr>
</thead>
<tbody class="nhsuk-table__body">
<tr class="nhsuk-table__row">
<th scope="row" class="nhsuk-table__header">
Monday
</th>
<td class="nhsuk-table__cell">
9am to 6pm
</td>
</tr>
<tr class="nhsuk-table__row">
<th scope="row" class="nhsuk-table__header">
Tuesday
</th>
<td class="nhsuk-table__cell">
9am to 6pm
</td>
</tr>
<tr class="nhsuk-table__row">
<th scope="row" class="nhsuk-table__header">
Wednesday
</th>
<td class="nhsuk-table__cell">
9am to 6pm
</td>
</tr>
<tr class="nhsuk-table__row">
<th scope="row" class="nhsuk-table__header">
Thursday
</th>
<td class="nhsuk-table__cell">
9am to 6pm
</td>
</tr>
<tr class="nhsuk-table__row">
<th scope="row" class="nhsuk-table__header">
Friday
</th>
<td class="nhsuk-table__cell">
9am to 6pm
</td>
</tr>
<tr class="nhsuk-table__row">
<th scope="row" class="nhsuk-table__header">
Saturday
</th>
<td class="nhsuk-table__cell">
9am to 1pm
</td>
</tr>
<tr class="nhsuk-table__row">
<th scope="row" class="nhsuk-table__header">
Sunday
</th>
<td class="nhsuk-table__cell">
Closed
</td>
</tr>
</tbody>
</table>
Macro
Tables with missing data
Open this example in a new tab: Tables with missing data
| Date | Vaccine | Product |
|---|---|---|
| 10 July 2024 | RSV | Abrysvo |
| 6 September 2023 | Flu | No data |
Code
Markup
<table class="nhsuk-table">
<caption class="nhsuk-table__caption nhsuk-table__caption--m">
Vaccinations given
</caption>
<thead class="nhsuk-table__head">
<tr class="nhsuk-table__row">
<th scope="col" class="nhsuk-table__header">
Date
</th>
<th scope="col" class="nhsuk-table__header">
Vaccine
</th>
<th scope="col" class="nhsuk-table__header">
Product
</th>
</tr>
</thead>
<tbody class="nhsuk-table__body">
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
10 July 2024
</td>
<td class="nhsuk-table__cell">
RSV
</td>
<td class="nhsuk-table__cell">
Abrysvo
</td>
</tr>
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
6 September 2023
</td>
<td class="nhsuk-table__cell">
Flu
</td>
<td class="nhsuk-table__cell nhsuk-u-secondary-text-colour">
No data
</td>
</tr>
</tbody>
</table>
Macro
Tables with numeric data
Open this example in a new tab: Tables with numeric data
| Item | Current charge | New charge |
|---|---|---|
| 3-month | £31.25 | £32.05 |
| 12-month | £111.60 | £114.50 |
| HRT | £19.30 | £19.80 |
Code
Markup
<table class="nhsuk-table">
<caption class="nhsuk-table__caption nhsuk-table__caption--m">
Prescription prepayment certificate (PPC) charges
</caption>
<thead class="nhsuk-table__head">
<tr class="nhsuk-table__row">
<th scope="col" class="nhsuk-table__header">
Item
</th>
<th scope="col" class="nhsuk-table__header nhsuk-table__header--numeric">
Current charge
</th>
<th scope="col" class="nhsuk-table__header nhsuk-table__header--numeric">
New charge
</th>
</tr>
</thead>
<tbody class="nhsuk-table__body">
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
3-month
</td>
<td class="nhsuk-table__cell nhsuk-table__cell--numeric">
£31.25
</td>
<td class="nhsuk-table__cell nhsuk-table__cell--numeric">
£32.05
</td>
</tr>
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
12-month
</td>
<td class="nhsuk-table__cell nhsuk-table__cell--numeric">
£111.60
</td>
<td class="nhsuk-table__cell nhsuk-table__cell--numeric">
£114.50
</td>
</tr>
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
HRT
</td>
<td class="nhsuk-table__cell nhsuk-table__cell--numeric">
£19.30
</td>
<td class="nhsuk-table__cell nhsuk-table__cell--numeric">
£19.80
</td>
</tr>
</tbody>
</table>
Macro
Tables with word breaks
Open this example in a new tab: Tables with word breaks
| Name | Email address | Status | Actions |
|---|---|---|---|
| Stephanie Meyer | stephanie.meyer9@test.com | Active | |
| Aleksandrina Featherstonehaugh-Whitehead | aleksandrina.featherstonehaughwhitehead23@folkestonepharmacy.test.com | Inactive |
Code
Markup
<table class="nhsuk-table">
<caption class="nhsuk-table__caption nhsuk-table__caption--m">
Users
</caption>
<thead class="nhsuk-table__head">
<tr class="nhsuk-table__row">
<th scope="col" class="nhsuk-table__header">
Name
</th>
<th scope="col" class="nhsuk-table__header">
Email address
</th>
<th scope="col" class="nhsuk-table__header">
Status
</th>
<th scope="col" class="nhsuk-table__header">
<span class="nhsuk-u-visually-hidden">Actions</span>
</th>
</tr>
</thead>
<tbody class="nhsuk-table__body">
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell nhsuk-u-text-break-word">
Stephanie Meyer
</td>
<td class="nhsuk-table__cell nhsuk-u-text-break-word">
stephanie.meyer9@test.com
</td>
<td class="nhsuk-table__cell">
<strong class="nhsuk-tag nhsuk-tag--green">
Active
</strong>
</td>
</tr>
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell nhsuk-u-text-break-word">
Aleksandrina Featherstonehaugh-Whitehead
</td>
<td class="nhsuk-table__cell nhsuk-u-text-break-word">
aleksandrina.featherstonehaughwhitehead23@folkestonepharmacy.test.com
</td>
<td class="nhsuk-table__cell">
<strong class="nhsuk-tag nhsuk-tag--grey">
Inactive
</strong>
</td>
</tr>
</tbody>
</table>
Macro
Tables as a card
Open this example in a new tab: Tables as a card
| Skin symptoms | Possible cause |
|---|---|
| Blisters on lips or around the mouth | Cold sores |
| Itchy, dry, cracked, sore | Eczema |
| Itchy blisters | Shingles, chickenpox |
Code
Markup
<div class="nhsuk-card">
<div class="nhsuk-card__content">
<table class="nhsuk-table">
<caption class="nhsuk-table__caption nhsuk-table__caption--m">
Impetigo can look similar to other skin conditions
</caption>
<thead class="nhsuk-table__head">
<tr class="nhsuk-table__row">
<th scope="col" class="nhsuk-table__header">
Skin symptoms
</th>
<th scope="col" class="nhsuk-table__header">
Possible cause
</th>
</tr>
</thead>
<tbody class="nhsuk-table__body">
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
Blisters on lips or around the mouth
</td>
<td class="nhsuk-table__cell">
Cold sores
</td>
</tr>
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
Itchy, dry, cracked, sore
</td>
<td class="nhsuk-table__cell">
Eczema
</td>
</tr>
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
Itchy blisters
</td>
<td class="nhsuk-table__cell">
Shingles, chickenpox
</td>
</tr>
</tbody>
</table>
</div>
</div>
Macro
Tables as a card (feature)
Open this example in a new tab: Tables as a card (feature)
Other conditions like impetigo
| Skin symptoms | Possible cause |
|---|---|
| Blisters on lips or around the mouth | Cold sores |
| Itchy, dry, cracked, sore | Eczema |
| Itchy blisters | Shingles, chickenpox |
Code
Markup
<div class="nhsuk-card nhsuk-card--feature">
<div class="nhsuk-card__content">
<h2 class="nhsuk-card__heading nhsuk-heading-m">
Other conditions like impetigo
</h2>
<table class="nhsuk-table">
<caption class="nhsuk-table__caption nhsuk-table__caption--s">
Impetigo can look similar to other skin conditions
</caption>
<thead class="nhsuk-table__head">
<tr class="nhsuk-table__row">
<th scope="col" class="nhsuk-table__header">
Skin symptoms
</th>
<th scope="col" class="nhsuk-table__header">
Possible cause
</th>
</tr>
</thead>
<tbody class="nhsuk-table__body">
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
Blisters on lips or around the mouth
</td>
<td class="nhsuk-table__cell">
Cold sores
</td>
</tr>
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
Itchy, dry, cracked, sore
</td>
<td class="nhsuk-table__cell">
Eczema
</td>
</tr>
<tr class="nhsuk-table__row">
<td class="nhsuk-table__cell">
Itchy blisters
</td>
<td class="nhsuk-table__cell">
Shingles, chickenpox
</td>
</tr>
</tbody>
</table>
</div>
</div>
Macro
Tables as a card (feature) responsive
Open this example in a new tab: Tables as a card (feature) responsive
Other conditions like impetigo
| Skin symptoms | Possible cause |
|---|---|
| Blisters on lips or around the mouth | Cold sores |
| Itchy, dry, cracked, sore | Eczema |
| Itchy blisters | Shingles, chickenpox |
Code
Markup
<div class="nhsuk-card nhsuk-card--feature">
<div class="nhsuk-card__content">
<h2 class="nhsuk-card__heading nhsuk-heading-m">
Other conditions like impetigo
</h2>
<table class="nhsuk-table-responsive" role="table">
<caption class="nhsuk-table__caption nhsuk-table__caption--s">
Impetigo can look similar to other skin conditions
</caption>
<thead class="nhsuk-table__head" role="rowgroup">
<tr class="nhsuk-table__row" role="row">
<th scope="col" class="nhsuk-table__header" role="columnheader">
Skin symptoms
</th>
<th scope="col" class="nhsuk-table__header" role="columnheader">
Possible cause
</th>
</tr>
</thead>
<tbody class="nhsuk-table__body">
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Skin problems </span>Blisters on lips or around the mouth
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Possible cause </span>Cold sores
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Skin problems </span>Itchy, dry, cracked, sore
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Possible cause </span>Eczema
</td>
</tr>
<tr class="nhsuk-table__row" role="row">
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Skin problems </span>Itchy blisters
</td>
<td class="nhsuk-table__cell" role="cell">
<span class="nhsuk-table-responsive__heading" aria-hidden="true">Possible cause </span>Shingles, chickenpox
</td>
</tr>
</tbody>
</table>
</div>
</div>