# Links and cross-references

Source: https://watership.ca/style-guide/links-and-cross-references/

Decides what link text says, where a link sits in a sentence, how to refer to another section, and how links open.

This section covers links to other pages and to other parts of the same page: the words that carry the link, where in a sentence the link goes, how often a term is linked, and whether a link opens in a new tab. In the examples, link markup appears inside code spans so you can see which words carry the link.

A link is read on its own. Screen readers list a page’s links by their text alone, search engines index them the same way, and a skimming reader’s eye lands on the underlined words before anything around them. Link text that only makes sense inside its sentence fails all three readers at once.

## Link text

### Descriptive link text

Rule `link-descriptive-text`: never, mechanical. Address: https://watership.ca/style-guide/links-and-cross-references/#link-descriptive-text

**Never use “click here,” “here,” “this,” “this page,” “read more,” or “link” alone as link text.** The link text must name the destination well enough that a reader who hears only the link knows where it goes. Screen readers read links out of context, so a page of “here” links is a page with no way in.

- Instead of: To set up exports, click `[here](https://example.com/exports)`.
- Write: To set up exports, see `[Configure exports](https://example.com/exports)`.

### Link the noun phrase

Rule `link-noun-phrase`: avoid, judgment. Address: https://watership.ca/style-guide/links-and-cross-references/#link-noun-phrase

**Link the noun phrase that names the destination.** Put the link on the title or name of the thing (a page, a section, a spec, a repository) and leave verbs, articles, and surrounding clauses outside it. A whole linked sentence hides where the link goes.

- Instead of: `[Read the API reference before you write your first request.](https://example.com/api)`
- Write: Read the `[API reference](https://example.com/api)` before you write your first request.

### Link text length

Rule `link-text-length`: prefer, mechanical. Address: https://watership.ca/style-guide/links-and-cross-references/#link-text-length

**Don’t let link text run to more than 8 words.** Long link text is hard to scan and, when read aloud, hard to tell from the sentence around it. If the destination’s title is longer, link a shortened form that still names it.

- Instead of: See the `[guide to configuring scheduled exports for enterprise workspaces in Acme Cloud](https://example.com/exports)`.
- Write: See `[Scheduled exports](https://example.com/exports)`.

## URLs

### No raw URLs in prose

Rule `link-no-raw-url`: avoid, mechanical. Address: https://watership.ca/style-guide/links-and-cross-references/#link-no-raw-url

**Don’t put a raw URL in prose when a link is possible, and don’t write “see the following link.”** Link the name of the destination instead. A bare URL is fine only where the reader might need to type or copy it, such as a printed document, a code sample, or a list of endpoints, and there it goes in code font. The exception is a reference entry, which prints its DOI or URL in full so the source can be found from a printed copy, as `ref-doi-url` sets out.

- Instead of: Documentation is at https://example.com/docs. See the following link for the API.
- Write: See the `[Acme Cloud documentation](https://example.com/docs)` and the `[API reference](https://example.com/api)`.

## Cross-references

### Cross-reference by section title

Rule `link-section-title`: avoid, mechanical. Address: https://watership.ca/style-guide/links-and-cross-references/#link-section-title

**Refer to another section by its title, as the link text, with no “above,” “below,” or page number.** Write “See Configure exports” with the section title carrying the link. Position words break as soon as the content moves or is read on a phone, and page numbers don’t exist on the web. This rule covers cross-references inside your own content. A citation of an outside printed work does give a page number, as `cite-locator` sets out. A PDF or printed document can also give section and page numbers, as `long-pdf-cross-references` sets out.

- Instead of: See the section below on page 4 for export settings.
- Write: See `[Configure exports](#configure-exports)`.

### Link at first mention

Rule `link-first-mention`: prefer, judgment. Address: https://watership.ca/style-guide/links-and-cross-references/#link-first-mention

**Link a term at its first mention in a section; later mentions stay plain.** Later mentions in the same section stay plain. A reader who wants the link can find it at the top of the section, and repeated links make a paragraph look like a directory. Link again in a new section if readers are likely to arrive there directly.

- Instead of: Create a `[workspace](https://example.com/workspaces)`. Each `[workspace](https://example.com/workspaces)` has its own settings.
- Write: Create a `[workspace](https://example.com/workspaces)`. Each workspace has its own settings.

### No linked headings

Rule `link-no-heading-links`: avoid, mechanical. Address: https://watership.ca/style-guide/links-and-cross-references/#link-no-heading-links

**Don’t make a heading a link.** A heading names the section under it; a linked heading sends the reader away from that section, and they can’t tell which of the two it will do. Put the link in the first sentence under the heading instead.

- Instead of: `## [Configure exports](https://example.com/exports)`
- Write: `## Configure exports`, then in the first sentence: For the full steps, see `[Configure exports](https://example.com/exports)`.

## Behavior

### Links open in the same tab

Rule `link-same-tab`: avoid, judgment. Address: https://watership.ca/style-guide/links-and-cross-references/#link-same-tab

**Open links in the same tab, including external links.** Readers know how to open a link in a new tab when they want one, and a forced new tab breaks the back button and surprises people who use screen readers. The exception is a link that leaves a page where the reader is in the middle of a task they would lose, such as a form or a setup wizard. There, open in a new tab and say so beside the link.

- Instead of: `<a href="https://example.com/pricing" target="_blank">Pricing</a>`
- Write: `<a href="https://example.com/pricing">Pricing</a>`

## About this section

**Rules.** 8 in this section: 5 mechanical, 3 judgment. Tiers: 1 never, 5 avoid, 2 prefer.

**Where the sources differ.** Both guides ban “click here” and neither sets a length for link text; the stock sets 8 words because a screen reader lists a page’s links on their own, and a long one is a sentence with no context.

**Sources.** Google developer documentation style guide and Microsoft Writing Style Guide. Adapted under CC BY 4.0, as [Sources and license](https://watership.ca/style-guide/#sources-and-license) sets out.
