HTML summary Attribute

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The summary attribute belonged on <table>. It held a text overview of the table aimed at assistive technologies. Unlike <caption>, that text was not shown visually.

Do not use it in new pages. MDN lists summary as deprecated; HTML treats it as obsolete. Prefer a visible <caption> (first child of the table). For longer structure notes, keep a short visible description nearby — optionally with aria-describedby. Not the same as the <summary> element inside <details>.

Deprecated / obsolete.

Study it only to read legacy tables. New work: <caption> + clear <th> headers (and scope when helpful).

Still parsed in many browsers.

Engines may keep the attribute for old pages. That is not a reason to write new summary markup.

HTML Syntax

syntax.html
<!-- obsolete --> <table summary=" text">
<!-- modern --> <table><caption> text</caption>…

Historical IDL: HTMLTableElement.summary (also obsolete for authors).

Attribute Values

Legacy value and modern replacements:

Value / approachDescriptionTry it
summary="…"Obsolete — non-visible table overview textTry it
<caption>Modern — visible title for everyoneTry it
Visible note + aria-describedbyExtra structure for complex tablesTry it
vs <summary> tagDifferent feature — details disclosure labelelement

Live Preview

Compare the obsolete attribute (text stays invisible) with a modern <caption> you can see.

pattern

Obsolete summary is for recognition only — ship <caption> in real projects.

Table

HTML Examples

Example 1 is historical. Examples 2–3 show what to write today.

Example 1 — Legacy summary (Do Not Ship)

Older tables put an invisible overview on the <table> tag.

HTML
<!-- Obsolete — for study only -->
<table summary="Quarterly sales by region. Rows are regions; columns are Q1–Q4.">
  <tr>
    <th>Region</th>
    <th>Q1</th>
    <th>Q2</th>
  </tr>
  <tr>
    <td>North</td>
    <td>12</td>
    <td>15</td>
  </tr>
</table>
Try It Yourself

How It Works

  1. summary on <table> stored an overview string.
  2. Not painted on screen — sighted users never saw that text.
  3. Assistive tech support varied — unreliable compared with caption.
  4. Obsolete today — recognize it in old HTML; do not copy it.

Example 2 — Modern <caption>

MDN’s replacement: a caption everyone can read.

HTML
<table border="1">
  <caption>Quarterly sales by region</caption>
  <tr>
    <th scope="col">Region</th>
    <th scope="col">Q1</th>
    <th scope="col">Q2</th>
  </tr>
  <tr>
    <th scope="row">North</th>
    <td>12</td>
    <td>15</td>
  </tr>
</table>
Try It Yourself

How It Works

  1. Put <caption> first inside the table.
  2. Visible title — helps everyone decide if the table matters.
  3. scope on headers clarifies row/column relationships.
  4. No summary attribute — caption covers the naming job.

Example 3 — Caption + Visible Description

For complex tables, keep extra structure notes visible (and optional ARIA link).

HTML
<p id="sales-note">
  Rows are regions. Columns are quarters Q1–Q2.
</p>
<table border="1" aria-describedby="sales-note">
  <caption>Quarterly sales by region</caption>
  <tr>
    <th scope="col">Region</th>
    <th scope="col">Q1</th>
    <th scope="col">Q2</th>
  </tr>
  <tr>
    <th scope="row">North</th>
    <td>12</td>
    <td>15</td>
  </tr>
</table>
Try It Yourself

How It Works

  1. Caption names the table; the paragraph explains structure.
  2. Visible text helps sighted and screen-reader users alike.
  3. aria-describedby points the table at that note (optional extra).
  4. Do not duplicate the same sentence in both caption and the note.

Edge Cases & Pitfalls

Most mistakes are shipping obsolete summary or confusing it with the <summary> tag.

obsolete

Validators flag it

Authors must not use summary on new tables. Remove it when you modernize old markup.

invisible

Sighted users never saw it

A caption is visible. That is why MDN recommends <caption> instead.

name clash

Attribute ≠ <summary> element

The element labels a <details> widget. Different feature entirely.

layout

Skip on layout tables

Do not add summaries (or captions) to tables used only for layout — prefer CSS layout instead.

a11y

Headers still matter

A caption does not replace good <th> cells and scope.

Browser Support

summary on <table> is an obsolete HTML attribute. Engines may still parse it for compatibility; authors must not use it.

✓ Deprecated · Do not use

summary

Recognized for legacy tables only. New markup should use caption (and clear headers).

N/A Authoring status
Google Chrome Parse*
Legacy / ignore for authors
Mozilla Firefox Parse*
Legacy / ignore for authors
Apple Safari Parse*
Legacy / ignore for authors
Microsoft Edge Parse*
Legacy / ignore for authors
Opera Parse*
Legacy / ignore for authors
Samsung Internet Parse*
Legacy / ignore for authors
Internet Explorer Yes
Legacy support
summary Obsolete

Bottom line: *May remain in the DOM for old pages. Do not add summary to new tables — migrate to caption.

Key Takeaways

  • Was: invisible overview text on <table>.
  • Status: deprecated / obsolete — do not ship.
  • Use instead: <caption> (+ visible notes if needed).
  • Not the <summary> element inside <details>.

One line: table summary is obsolete — name tables with <caption>.

Frequently Asked Questions

On a table element, summary held a text overview of the table for assistive technologies. The text was not shown visually like a caption.
Yes. MDN lists summary on table as deprecated. The WHATWG HTML Standard treats it as obsolete — do not use it in new pages.
Use a caption element as the first child of the table so everyone can see the title. For extra structure notes, put a short visible description near the table (optionally linked with aria-describedby).
No. The summary attribute on table is obsolete. The summary element is a separate tag used as the visible heading inside a details disclosure widget.
It was invisible to sighted users, inconsistently exposed to assistive tech, and caption (plus clear headers) covers the need more reliably for everyone.
Many engines still parse the attribute for old pages, but authors must not rely on it. Prefer caption for new tables.

Next: tabindex

Control which elements can receive keyboard focus.

tabindex tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful