How a table of contents works
A table of contents is built from the page’s own headings. Each heading is given an identifier in the markup, and each entry in the list links to that identifier, so clicking it moves the reader down the page instead of loading a new one. Nothing is fetched and no new URL is visited — the browser simply scrolls.
Because it is generated from headings, the quality of the list is decided entirely by the quality of the headings. Sections named for what they answer produce a useful list. Sections named as slogans produce a list that tells a reader nothing, and no plugin can rescue that.
Search engines read the same structure. Google sometimes shows links to individual sections beneath a result, and it builds those from the page’s headings and anchors rather than from any particular plugin. You cannot force it and should not promise it to a client, but a clearly divided page is the only version that can qualify.
Why a table of contents matters
Most people do not read a long page; they hunt inside it. Somebody who arrived searching for one specific answer wants to know within seconds whether that answer is here and where it sits. A contents list answers both questions at once, and the alternative — scrolling and skimming — is where people give up.
It is worth more on a phone, where a long page is an endless column and there is no scrollbar to judge length by. The list acts as a map of a document the reader cannot see the shape of. It also helps you as the author: a contents list you would not want to show a reader is usually a sign the page is disorganised rather than a sign the list is unnecessary.
Common mistakes with a table of contents
Putting one on a short page is the most common. If the whole article fits in a screen or two, a contents list is furniture that pushes the answer further down. The second is including every heading level, so a plugin produces a wall of nested links longer than some of the sections it points at.
Third is anchors that land wrong. A sticky header will sit over the top of the target heading, so the reader jumps to a section and sees the middle of it — a styling fix, but one that makes the whole feature feel broken. Fourth is a contents list built only for search: hidden, collapsed by default on desktop, or generated with headings that do not match the visible ones.
How to act on it
Add one when a page is genuinely long and genuinely sectioned, and write the headings first so the list has something worth listing. Include only the top level of sections, keep the labels identical to the headings on the page, and let it collapse on small screens rather than filling the first screen with links.
Then use it yourself. Read the list on its own and ask whether it describes a page that answers the question it promises. If it does not, the fix is to the page, not the list — which is the ordinary work of on-page SEO.
