Empty Table Headers in Google Sites
Why do I need table headers?
Table headers play an important role in accessibility. They help screen readers communicate the relationship between rows and columns, making it easier for visitors to understand the information in your table. Without headers, data can be read back in a way that is confusing or incomplete.
Adding Table Headers
To add a table header to your table on a Google Site, you will need to be familiar with editing HTML. In the examples below, we will be using fake information from a made-up conference schedule.
Make the first row a header
The first row of a table might look something like the example below. It contains labels for the data in subsequent rows.
<table>
<tbody>
<tr>
<td>Time</td>
<td>Track A: The Innovator's Path</td>
<td>Track B: The Builder's Workshop</td>
</tr>
...
It will need to be changed to this format:
<table>
<thead>
<tr>
<th>Time</th>
<th>Track A: The Innovator's Path</th>
<th>Track B: The Builder's Workshop</th>
</tr>
</thead>
<tbody>
<tr>
... etc
Make the first column a header
To make the first column a header, you will need to adjust the first cell in each row.
<table>
<tbody>
<tr>
<th>Time</th>
<td>Track A: The Innovator's Path</td>
<td>Track B: The Builder's Workshop</td>
</tr>
<tr>
<th>8:00 am</th>
<td>Registration and coffee</td>
<td>Registration and coffee</td>
</tr>
... etc
Make both the first column and first row table headers
You will need to do a combination of the steps above. Here is some example code of what that could look like.
<table>
<thead>
<tr>
<th>Time</th>
<th>Track A: The Innovator's Path</th>
<th>Track B: The Builder's Workshop</th>
</tr>
</thead>
<tbody>
<tr>
<th>8:00 am</th>
<td>Registration and coffee</td>
<td>Registration and coffee</td>
</tr>
... etc
Use of tables for organizing content and page layout
Do not use tables for organizing content or for creating page layouts.
Assistive technologies, such as screen readers, have difficulty navigating tables that are not used for actual data sets. This can lead to content being read out of order or being missed entirely, creating a confusing and frustrating experience for visitors.
For Google Sites, we recommend using the existing Content Blocks to create rows and columns for your content.