Webstandards banner

Tabular Data & Tables

Tables are particularly difficult to understand when read by a screen reader when not coded properly. By default, screen readers will read each row, left to right. By the time the listener hears the data on row 3, they may no longer remember which column is which.

For that reason we use tags to identify column and row headers. The scope attribute identifies which data cells are associated to this heading. When coded properly, the screen reader will read the heading, then the associated data, the next heading, followed by the associated data, etc.

Captions are added for additional explanation.

Example 1

Listing of Newspaper Employees
NameDepartment Title Supervisor
Mary JonesWorld News Editor Yes
Tom SmithLocal News Copywriter No

HTML Code for Example 1:

<table class="tableBorder  width100pct"  summary="Listing of Newspaper Employees" >
  <caption>Listing of Newspaper Employees
      <th> Name</th>
      <th>Department </th>
      <th>Title </th>
      <th>Supervisor </th>
      <td> Mary Jones</td>
      <td>World News </td>
      <td>Editor </td>
      <td>Yes </td>
      <td> Tom Smith</td>
      <td>Local News </td>
      <td>Copywriter </td>
      <td>No </td>

Example 2

Simple Data Table
 Column 1 Header Column 2 Header
 Row 1 Header Column 1 Row 1 dataColumn 2 Row 1 data
 Row 2 Header Column 2 Row 1 dataColumn 2 Row 1 data

HTML Code for Example 2

<table summary="Simple Data Table"  class="width100pct tableBorder">
  Simple Data Table
   <th> </th>
   <th> Column 1 Header </th>
   <th> Column 2 Header </th>
   <th> Row 1 Header </th>
   <td> Column 1 Row 1 data </td>
   <td>Column 2 Row 1 data </td>
   <th> Row 2 Header </th>
   <td> Column 2 Row 1 data</td>
   <td>Column 2 Row 1 data </td>

Best Practices

  • Always use <th> elements for header items.
  • Always use scope attributes in <th> tags unless id and headers attributes are required.
  • Always use <caption> elements.
  • Use summary attributes for complicated tables.
  • Use <table> elements for tabular data. Use <div> and <span> elements to affect layout.
  • Avoid cells that span multiple rows or multiple columns. 

CMS Entry


Must be added for accessibility

  • Select Table
  • Enter Summary information

Add summary information

Header Row or Column

  • Highlight the row or column
  • Choose Format as table header

Declare a header Row

Add a Border

  • Select table
  • Select with Border

Format Table

Contact Information

Web Services Team
Information Systems Department
County of Sonoma
2615 Paulin Drive
Santa Rosa, CA 95403
38.466385, -122.722706

Related Policies

Official Use of Social Media Sites
Administrative Policy Manual, 9-1

Website Accessibility Policy
Administrative Policy Manual, 9-3

Accessibility Resources

Web Accessibility
Introduction to Web Accessibility

Converting Documents to PDF's

Creating Accessible Word Documents

PowerPoint Accessibility

Regulatory Compliance Resources