An important aspect here is accessibility: By using th elements both on top and to the left with according scope attributes (col/row), screenreaders "understand" (and read/output in some way) that there are two headers for each td- one on top and one to the left. The important thing for that is not the thead element (which some browsers even add automatically if it isn't included in the original code, but which couldn't possibly be added for a column), but the th elements, which indicate header cells.

Answer from Johannes on Stack Overflow
🌐
Bootstrap
getbootstrap.com › docs › 4.0 › content › tables
Tables · Bootstrap
<table class="table"> <thead class="thead-dark"> <tr> <th scope="col">#</th> <th scope="col">First</th> <th scope="col">Last</th> <th scope="col">Handle</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <th scope="row">2</th> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <th scope="row">3</th> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table> <table class="table"> <thead class="thead-light"> <tr> <th scope="col">#</th> <th scope="col">First</th> <th scope="col">Last</th> <th scope="col">Handle</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <th scope="row">2</th> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <th scope="row">3</th> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table>
🌐
Bootstrap
getbootstrap.com › docs › 5.0 › content › tables
Tables · Bootstrap v5.0
Using the most basic table markup, here’s how .table-based tables look in Bootstrap. <table class="table"> <thead> <tr> <th scope="col">#</th> <th scope="col">First</th> <th scope="col">Last</th> <th scope="col">Handle</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <th scope="row">2</th> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <th scope="row">3</th> <td colspan="2">Larry the Bird</td> <td>@twitter</td> </tr> </tbody> </table>
🌐
Bootstrap
getbootstrap.com › docs › 5.3 › content › tables
Tables · Bootstrap v5.3
Using the most basic table markup, here’s how .table-based tables look in Bootstrap. <table class="table"> <thead> <tr> <th scope="col">#</th> <th scope="col">First</th> <th scope="col">Last</th> <th scope="col">Handle</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <th scope="row">2</th> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <th scope="row">3</th> <td>John</td> <td>Doe</td> <td>@social</td> </tr> </tbody> </table>
🌐
W3Schools
w3schools.com › tags › att_th_scope.asp
HTML th scope Attribute
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more.
🌐
Bootstrap
getbootstrap.com › docs › 4.6 › content › tables
Tables · Bootstrap v4.6
<table class="table"> <thead class="thead-dark"> <tr> <th scope="col">#</th> <th scope="col">First</th> <th scope="col">Last</th> <th scope="col">Handle</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <th scope="row">2</th> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <th scope="row">3</th> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table> <table class="table"> <thead class="thead-light"> <tr> <th scope="col">#</th> <th scope="col">First</th> <th scope="col">Last</th> <th scope="col">Handle</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <th scope="row">2</th> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <th scope="row">3</th> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table>
🌐
W3C
w3.org › TR › WCAG20-TECHS › H63.html
H63: Using the scope attribute to associate header cells and data cells in data tables | Techniques for WCAG 2.0
The scope identifies whether the cell is a header for a row, column, or group of rows or columns. The values row, col, rowgroup, and colgroup identify these possible scopes respectively. For simple data tables where the header is not in the first row or column, like the one in Example 1, this ...
🌐
MDBootstrap
mdbootstrap.com › standard › tables
Bootstrap Tables - free examples & tutorial
<table class="table"> <thead> <tr> <th scope="col">Class</th> <th scope="col">Heading</th> <th scope="col">Heading</th> </tr> </thead> <tbody> <tr> <th scope="row">Default</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-primary"> <th scope="row">Primary</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-secondary"> <th scope="row">Secondary</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-success"> <th scope="row">Success</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-danger"> <th scope="row">Danger</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-warning">
🌐
FastBootstrap
fastbootstrap.com › components › table
Bootstrap Table Component - Examples & Tutorial - FastBootstrap
<table class="table"> <thead> <tr> <th scope="col">Class</th> <th scope="col">Heading</th> <th scope="col">Heading</th> </tr> </thead> <tbody> <tr> <th scope="row">Default</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-primary"> <th scope="row">Primary</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-secondary"> <th scope="row">Secondary</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-success"> <th scope="row">Success</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-danger"> <th scope="row">Danger</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-warning">
Find elsewhere
🌐
SoloDev
solodev.com › blog › web-design › ultimate-guide-to-understanding-bootstrap-tables.stml
Ultimate Guide to Understanding Bootstrap Tables
May 24, 2018 - Making tables as clean and clearly understandable as possible is our job as web design experts. But that doesn't mean we don't appreciate a handy shortcut. Fortunately for us, Bootstrap has a number of default classes which makes dealing with tables considerably easier.
🌐
W3schools-fa
w3schools-fa.ir › tags › att_td_scope.html
HTML td scope Attribute - w3schools
The scope attribute has no visual effect in ordinary web browsers, but can be used by screen readers. ... Tabs Dropdowns Accordions Side Navigation Top Navigation Modal Boxes Progress Bars Parallax Login Form HTML Includes Google Maps Range Sliders Tooltips Slideshow Filter List Sort List · HTML CSS JavaScript SQL Python PHP jQuery Bootstrap XML Read More »
🌐
W3Schools
www-db.deis.unibo.it › courses › TW › DOCS › w3schools › tags › att_td_scope.asp.html
HTML td scope Attribute
The scope attribute defines a way to associate header cells and data cells in a table.
🌐
Arizona
digital.arizona.edu › arizona-bootstrap › docs › 2.0 › content › tables
Tables · Arizona Bootstrap
<table class="table"> <thead class="thead-dark"> <tr> <th scope="col">#</th> <th scope="col">First</th> <th scope="col">Last</th> <th scope="col">Handle</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <th scope="row">2</th> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <th scope="row">3</th> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table> <table class="table"> <thead class="thead-light"> <tr> <th scope="col">#</th> <th scope="col">First</th> <th scope="col">Last</th> <th scope="col">Handle</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <th scope="row">2</th> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <th scope="row">3</th> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table>
🌐
Devwares
devwares.com › docs › contrast › javascript › table › table
Bootstrap 5 Table
Additional advantages of Bootstrap tables include responsiveness and the ability to customize table styles. Buttons, checkboxes, panels, and suchlike can be added to your tables to make them look more appealing. You can also use advanced data table features such as sorting, searching, and pagination. htmlCopy · <div class="container"> <table class="table"> <thead> <tr> <th scope="col">#</th> <th scope="col">First</th> <th scope="col">Last</th> <th scope="col">Handle</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <th scope="row">2</th> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <th scope="row">3</th> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div> htmlCopy ·
🌐
AcceDe Web
accede-web.com › homepage › accede web guidelines › html and css accessibility guidelines › 9. tables › 9.2. tag simple data table headers with and scope
9.2. Tag simple data table headers with <th> and scope - AcceDe Web
September 1, 2025 - An entire row: scope="row". <table> <caption>Average monthly temperatures of the 3 largest cities in Canada.</caption> <tr> <td>&nbsp;</td> <th scope="col">Toronto</th> <th scope="col">Montreal</th> <th scope="col">Vancouver</th> </tr> <tr> <th scope="row">June</th> <td>22°C</td> <td>28°C</td> <td>26°C</td> </tr> <tr> <th scope="row">July</th> <td>24°C</td> <td>30°C</td> <td>28°C</td> </tr> </table>
🌐
GitHub
github.com › twbs › bootstrap › issues › 35848
Table examples use deprecated `scope` attribute · Issue #35848 · twbs/bootstrap
February 16, 2022 - Table examples here are using scope="col" and scope="row" - but these HTML attributes are marked as deprecated. Do you think we should remove them from the examples?
Author   coliff
🌐
MDBootstrap
mdbootstrap.com › standard › tables
Bootstrap 4 table responsive - examples & tutorial.
<table class="table"> <thead> <tr> <th scope="col">Class</th> <th scope="col">Heading</th> <th scope="col">Heading</th> </tr> </thead> <tbody> <tr> <th scope="row">Default</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-primary"> <th scope="row">Primary</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-secondary"> <th scope="row">Secondary</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-success"> <th scope="row">Success</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-danger"> <th scope="row">Danger</th> <td>Cell</td> <td>Cell</td> </tr> <tr class="table-warning">
🌐
Adobe Support Community
community.adobe.com › t5 › dreamweaver-discussions › bootstrap-table-attributes › td-p › 13071579
Bootstrap table attributes - Adobe Product Community - 13071579
November 12, 2022 - It worked, but it was about about to change bootstrap css files. I thought that was a VERY bad idea and did not proceed. Can I change the font externally? I added some nice attributes with nancy's info, but I still have some. questions. can I add border lines, and can I set a max width? This the code I have so far: <table class="table caption-top responsive-table table-striped" > <caption>Cam-33 Designations</caption> <thead class="table-dark"> <tr> <th scope="col" >&nbsp;</th> <th scope="col">Cam-33-2</th> <th scope="col">Cam-33-3</th> <th scope="col" >Cam-33-4</th> <th scope="col">Cam-33-6</
🌐
DotFactory
dofactory.com › html › th › scope
HTML <th> scope Attribute
<style> table.tb { width: 300px; border-collapse: collapse; } .tb th { background-color: lightblue; } .tb th, .tb td { border: solid 1px #777; padding: 5px; } </style> <table class="tb"> <tr> <th scope="col">Name</th> <th scope="col">Country</th> </tr> <tr> <td>Denice Templeman</td> <td>Italy</td> </tr> <tr> <td>Paulo Cornell</td> <td>USA</td> </tr> <tr> <td>Maria Larsson</td> <td>Sweden</td> </tr> </table> Try it live