Keep a stable HTML identifier attached to the same useful source passage when you revise its heading. Treat that identifier as a maintained link target, not a disposable output of the current title. When the passage's meaning changes or disappears, review the old target explicitly instead of silently sending it somewhere unrelated.
The artifact is a fragment acceptance contract: target identity, explicit ID, passage purpose, known links, revision treatment and verification cases. It governs the part after the hash in a page URL. It does not replace a document redirect map or promise that answer engines will cite a particular section.
Understand what the fragment identifies
MDN's HTML ID reference says an ID must be unique within the document and can identify an element for fragment linking. Its URI fragment reference explains that the fragment is processed by the client after retrieval rather than being sent to the server in the resource request.
That distinction changes verification. A base URL returning a successful response does not establish that a fragment reaches the intended passage. A server redirect that handles the page path also does not, by itself, prove continuity of every section target. Test the complete reader path in a browser.
The citation destination resolver identifies the document behind a link. This contract starts after that document is established and asks whether its specific in-page reference still means what the link promises.
Assign identity independently of cosmetic wording
Use a clear, stable ID under the site's implementation conventions. A section about export limitations might keep the identifier export-limits when its heading changes from “Export limits” to “What an export includes.” The human heading can improve while the maintained target remains stable.
Do not infer stability from visual text alone. Some publishing systems regenerate IDs from headings automatically. Others permit explicit identifiers. Inspect the actual emitted HTML and the documented behavior of your system before deciding which maintenance rule is feasible.
Avoid duplicating the same ID to preserve several places. Uniqueness is a document-level requirement, so an old target and its new target cannot both use one identifier on the same page. Choose a supported implementation that retains one clear destination and test its behavior.
Write the fragment contract
| Contract Field | Decision |
|---|---|
| Passage identity | The question or evidence the target is intended to expose |
| Explicit ID | The unique identifier and owning template or section |
| Known uses | Important owned links, downloads or support references |
| Revision treatment | Keep target, move with passage or retire with explanation |
| Verification | Direct load, navigation and correct visible passage |
Record a source revision and owner. A list of fragment strings without their intended meaning cannot help an editor decide whether a replacement still serves the original reference. The contract should connect the target to a reader task, not merely to a heading number.
A fictional heading revision
Imagine a fictional implementation guide with the target #supported-files. A support article links to that target to explain which upload formats the guide accepts. The editor renames the section to “Prepare an upload” and moves it later in the page. The accepted file list remains substantively the same.
If the platform supports explicit IDs, retaining supported-files on that passage can preserve the link's purpose through the edit. The reviewer loads the original complete URL and confirms that the relevant passage is available and identifiable. A changed heading need not create a broken reader path.
Now suppose the section is replaced with a general sales invitation while the actual file rules move to another document. Keeping the old fragment on the sales invitation would preserve a string while breaking the promise. The contract needs a content decision: an accurate transitional explanation, a maintained equivalent passage or a clearly described successor where appropriate.
These paths and content states are fictional. They illustrate why fragment continuity depends on substance as well as technical reachability.
Distinguish element IDs from text fragments
A normal element fragment such as #supported-files points to a publisher-defined target. A text-fragment link uses a different mechanism to identify matching text. Do not assume maintaining one guarantees the other survives an edit, or that changing a heading affects both in the same way.
For this contract, focus on the IDs the publisher owns. Do not freeze misleading wording simply to preserve an exact text match. Correct the content and then review the affected link targets. Accuracy takes priority over an obsolete link pattern.
Use the anchor promise review when deciding whether the destination still fulfills a reference. A technically functioning jump to unrelated material is not a completed repair.
Test direct entry and the real presentation
Open the full URL with its fragment in the actual public rendering. Check a fresh direct load, a link from another page and ordinary in-page navigation. Confirm the intended element exists once, the target passage is present and the reader can recognize what was promised.
If content or IDs are added by JavaScript, inspect the rendered state and timing under the relevant test conditions. Do not claim that a source-code search alone verifies the final reader experience. Likewise, a screenshot of the right section does not establish which fragment led there.
Test sticky navigation and responsive layouts where they affect visibility. An element can be targeted while its heading is hidden behind a fixed header. Document the observed presentation issue and use the site's normal design process to fix it rather than changing IDs repeatedly.
Add passage continuity to release review
Keep representative fragment cases with the regression contract. A deterministic check can detect a missing or duplicate target, while a human still reviews whether the passage's meaning remains appropriate. Do not turn that technical check into a ranking or citation assertion.
Close a revision when the important existing targets still reach the intended content, or each retired target has a deliberate documented treatment. The useful result is a source passage another reader can locate after editorial improvements, without treating every heading rewrite as a new document identity.
