Skip to main content
This website has been provided to The Practice for evaluation purposes, and should not be used by Patients. ×
  • Language
    • Afrikaans
    • Albanian
    • Arabic
    • Armenian
    • Azerbaijani
    • Basque
    • Belarusian
    • Bengali
    • Bulgarian
    • Catalan
    • Chinese (Simplified)
    • Chinese (Traditional)
    • Croatian
    • Czech
    • Danish
    • Dutch
    • Esperanto
    • Estonian
    • Filipino
    • Finnish
    • French
    • Galician
    • Georgian
    • German
    • Greek
    • Gujarati
    • Haitian Creole
    • Hebrew
    • Hindi
    • Hungarian
    • Icelandic
    • Indonesian
    • Irish
    • Italian
    • Japanese
    • Kannada
    • Korean
    • Lao
    • Latin
    • Latvian
    • Lithuanian
    • Macedonian
    • Malay
    • Maltese
    • Norwegian
    • Persian
    • Polish
    • Portuguese
    • Romanian
    • Russian
    • Serbian
    • Slovak
    • Slovenian
    • Spanish
    • Swahili
    • Swedish
    • Tamil
    • Telugu
    • Thai
    • Turkish
    • Ukrainian
    • Urdu
    • Vietnamese
    • Welsh
    • Yiddish
  • 01253 608013
  • Text Size
    • Increase Text Size
    • Decrease Text Size
    • Reset Text Size
The Practice Providing NHS services
Providing NHS services
Search
Show Main Menu
  • Home
  • Surgery Time
  • Doctors & Staff
  • Clinics
  • Blog
  • Practice News
  • Contact Us
  • Test
    • Drop-down Test 1
  • Hello
    • worldpay test 2
    • wiggly
    • wiggly2
    • worldpay test 3
    • Hello
    • worldpay test
Show Side Menu
  • Online Access
  • Accessible Information
  • Alcohol Audit C
  • Allergies
  • asthma
  • Asthma Review
  • Baby 8 Week Review
  • Book an Appointment
  • Cancel an Appointment
  • Carer Questionnaire
  • Change of Address
  • Communication Consent
  • Consent
  • Contraceptive Pill Review
  • Electronic Prescribing Service
  • Enhanced Summary Care Record
  • Feedback for the Practice
  • Fitness for Work / Sick note
  • General Health Check
  • General Practice Physical Activity Questionnaire (GPPAQ)
  • Health Review
  • Health Review for patients with a learning disability
  • Join Patient Reference Group
  • Long Term Conditions
  • Medication Review
  • multiple checkbox test
  • Patient Health Questionnaire (PHQ-9)
  • Patient Registration
  • Prescription Charges Exemption
  • Question for the Practice
  • Register for Online Services
  • Repeat Prescription
  • Repeat Prescriptions
  • Smoking Status
  • Summary Care Record Opt-Out
  • Telephone Consultation
  • test 12345
  • Travel Vaccinations
  • University Registration
  • Update Clinical Record
Practice Booklet
NHS 111 - if it's less urgent than 999

Key Information

  • Clinics
  • Sign Posting Examples
  • Practice Catchment Area
  • Hello
  • Anchors page
  • NHS Videos
  • eConsult code
  • table with a background image
  • wiggly
  • buttons test
  • Friends and Family Test Banner Code
  • Tabs
  • Custom Image Quick Links
  • Custom Colour Code
  • Survey Banner Code
  • Pop Up Code
  • Primary Care Web HTML Code
  • Health Dashboard 2
  • Image Hover
  • Google Translate
  • File test page
  • Sensely Widget
  • Popup Test
  • Quick Exit Button
  • Cookie Test
  • Accessibility Resources
  • Sensely
  • two-pop
  • Events
  • Custom Image Buttons 1
  • Custom Image Buttons 2
  • New Button Test
  • Custom Image Buttons 3
  • CSS Button Test
  • iframe test
  • NHS Button Test
  • nhs button test 2
  • Sick or Fit Note Tester
  • Privacy Notice
  • Times
  • checkboxes
  • Insert test
  • Another Test Page
  • FFT
  • Tables
  • econsult test
  • Screen Reader Test
  • Temp test
  • widget test
  • Another widget test
  • Test9
  • Lists
  • NHS Map page
  • NHS Map Page 2
  • Test x
  • Accurx Custom Buttons
  • image test
  • maps
  • Who Should I See
  • Test123
  • BP Test
  • ul type disc code
  • easter
  • Banner Strip with Button
  • NHS Wales App plus AccurX
  • Live Well
  • Conditions A to Z
Home > Tables

Tables

The difference between data tables and layout tables

"A data table is a table that displays relationships. These relationships do not have to be numerical. For example, there could be a table that displays provinces in Canada and the most common dog breeds in each province."

"Layout tables are present when an HTML table element is being used solely for visual formatting and relationships are not being displayed"

"Generally, it is best to avoid using layout tables when possible. Layout tables must be coded as presentational."

https://accessibleweb.com/question-answer/how-are-layout-tables-and-data-tables-different/

 

Data Tables

Used for showing relationships in data.
These must have captions. The caption is the first thing after the opening table tag and it is read out by the screen reader.
Column headers, row headers or both are used to help screen reader users understand what each cell relates to. TH rather than TD indicates a cell that is a header.
The header cells include a 'scope' value which tells the screen reader whether they are a row or column header.

The code for a very basic data table without a top header row would look like...

<table>
<caption><h2>Caption Here</h2></caption>
<tbody>
<tr>
<th scope="row">Row 1 Header</th>
<td>Row 1 Data</td>
</tr>
</tbody>
</table>

Caption Here

Row 1 Header Row 1 Data

The inclusion of <tbody> before the data rows and </tbody> after them isn't necessary for accessibility but is often used, and the editor will do this on edited tables.

 

Examples with no top header row

 

2 Column Times With No Top Header Row

Monday Insert Monday times here
Tuesday Insert Tuesday times here
Wednesday Insert Wednesday times here
Thursday Insert Thursday times here
Friday Insert Friday times here
Saturday Insert Saturday times here
Sunday Insert Sunday times here

 

3 Column GP Partners Table with no header row

Dr John Smith (Male) MBChB MRCGP
Dr Peter Jones (Male) MBBS DRCOG MRCGP
Dr Carol Brown (Female) MBBS MRCGP
Dr Alison James (Female) MBBS MRCGP, DRCOG, DFSRH

 

3 column times With No Top Header Row

Monday Monday times here Monday times part 2
Tuesday Tuesday times here Tuesday times part 2
Wednesday Wednesday times here Wednesday times part 2
Thursday Thursday times here Thursday times part 2
Friday Friday times here Friday times part 2
Saturday Saturday times here Saturday times part 2
Sunday Sunday times here Sunday times part 2

 

4 column times With No Top Header Row

Monday Monday times here Monday times part 2 Monday times part 3
Tuesday Tuesday times here Tuesday times part 2 Tuesday times part 3
Wednesday Wednesday times here Wednesday times part 2 Wednesday times part 3
Thursday Thursday times here Thursday times part 2 Thursday times part 3
Friday Friday times here Friday times part 2 Friday times part 3
Saturday Saturday times here Saturday times part 2 Saturday times part 3
Sunday Sunday times here Sunday times part 2 Sunday times part 3

 

The code for a very basic data table with a top header row would look like...

<table>
<caption><h2>Caption Here</h2></caption>
<thead>
<tr>
<th scope="col">Column 1 Header</th>
<th scope="col">Column 2 Header</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Row 1 Header</th>
<td>Row 1 Data</td>
</tr>
</tbody>
</table>

Note, the top header row is within a thead tag and the rest is within tbody. We need to include thead around a top header row because the editor may mark it as being part of the tbody otherwise and that would be wrong, strictly speaking.

 

Caption Here

Column 1 Header Column 2 Header
Row 1 Header Row 1 Data

Code to get a border as above: <table class="tableborder"> instead of <table> at the start

 

Last Updated 2 May 2025

Share

  • Print
  • Facebook
  • Bluesky
  • X (Twitter)
  • LinkedIn
Local Services

Site

  • Sign In
  • Sitemap
  • Back To Top

About

  • Disclaimer
  • Website Privacy
  • Website Accessibility
  • Cookies
  • Content Attribution

Social

  • Facebook
  • X (Twitter)

Contact

the surgery

15 Olympic COurt, Whitehills Business Park, Blackpool, Lancashire, FY4 5GU

  • 01253 608013
  • reception@thepractice.co.uk

Second surgery

Somewhere, Some Town, FY4 5P3

  • 01234567890
© Neighbourhood Direct Ltd  2025
Website supplied by Oldroyd Publishing Group

Loading...

Local Services