Table Caption and Summary
The <caption> element provides a title for a table. It must be the first child of <table> and is displayed centered above the table by default. A caption helps all users understand the purpose of the data at a glance.
Accessibility and the Summary
For complex tables, the summary attribute (HTML4) provided a description for screen readers, but it was removed in HTML5. The modern approach is to use <caption> for a visible title, and add a longer description either before the table in a <p>, or link to one using aria-describedby. The <details> element inside the caption is another progressive approach.