Recent chats
ASKGEEZ Q&A GUIDEWriting & communication

How do I tell visitors that a link opens a file or leaves the website?

Quick answer

Write link text that describes what visitors will reach. When useful, add a short note naming a file’s format or size, or warning that a link opens a new tab or window. Check the actual resource and link behavior before adding those details: a URL alone does not confirm what a file contains or how a link behaves. [S1] [S2]

LET’S WORK THROUGH IT

The question, the details, the next step.

Question

I have links to both files and other websites. How can I tell visitors what will happen without cluttering the page?

Geez

Make the link text identify its destination, then add only the extra detail that would help someone decide whether to open it. For a file, that might be the format or size; W3C recommends descriptive link text and says relevant details such as document type and file size can be useful. [S1] For a link that opens a new tab or window, give advance warning because the change can disorient users. [S2]

Keep “leaves this website” separate from “opens a new tab”: those describe different things. A link may go to another site without opening a new tab, and the fact that it goes elsewhere does not tell you whether it opens or downloads a file. Check each behavior rather than implying one from the other.

Follow-up question

What would concise link text and notes look like in practice?

Geez

Use a label that still makes sense when read on its own. For example, assuming you have verified the resource and link behavior, you could write:

“Download the [event schedule] (PDF, [file size]).” “Read the [organizer’s event policy] (opens in a new tab).”

Replace the bracketed placeholders with verified details, and omit a note if it is not useful. If visitors should know a destination is outside your website, say so plainly—such as “Visit the [organizer’s website]”—but don’t call it a new-tab link unless you have checked that it opens a new tab or window. W3C’s new-window advice concerns that behavior, not whether a destination is external. [S2]

Follow-up question

How do I verify what to disclose? I can see the link address, but I’m not sure that tells me enough.

Geez

Treat the address as a pointer, not proof of the file’s properties or the way the link behaves. Open or inspect the actual target using your normal publishing checks. Confirm the resource is the one the link text describes, check any format or size you plan to mention, and test whether the link opens a new tab or window. The W3C guidance supports disclosing useful file details, but it does not verify any particular file or link; those details must be checked against the actual target. [S1] [S2]

If you cannot confirm a detail, leave it out or use a neutral description you can verify. Don’t guess the file type from its name or say “opens in a new tab” based only on the destination address.

Follow-up question

Can you give me a quick review checklist I can reuse before publishing?

Geez

For each link, review it in context:

  1. Does the link text describe the destination clearly, rather than relying on surrounding text alone? [S1]
  2. Is the destination a file or a web page? Check the actual target.
  3. If you mention a file format or size, have you verified that detail? [S1]
  4. If the link opens a new tab or window, have you confirmed the behavior and warned visitors in advance? [S2]
  5. Have you avoided treating “external,” “opens a new tab,” and “downloads a file” as interchangeable claims?
  6. Does the note help visitors choose, without repeating information they can already see?

Example to adapt: “Download the [report title] ([verified format], [verified size]).” Keep only details you have checked.

A practical checklist

  • Write link text that describes its destination.

  • Check whether the target is a file or a web page.

  • Verify any file format or size before stating it.

  • Test whether the link opens a new tab or window; warn visitors if it does.

  • Distinguish an external destination from a new-tab link or file download.

  • Remove notes that are unverified or do not help visitors choose.

A few more useful answers

Should I label every link to another website as opening a new tab?

No. A link leaving your website and a link opening a new tab describe different properties. Check the actual behavior before adding a new-tab warning. [S2]

Do I need to include a file’s format and size every time?

Include those details when they help visitors decide whether to open the file, and verify them first. W3C identifies document type and file size as examples of useful target information, not details that must appear on every link. [S1]

Does the guidance confirm how a particular link or file behaves?

No. The guidance supports clear link text and relevant disclosures, but it does not establish the properties of a specific resource. Inspect the actual file and test the link before publishing claims about them. [S1] [S2]

Sources

References used for this guide.

  1. [S1] Writing for Web Accessibility – Tips for Getting Started
    w3.org · Checked
  2. [S2] G201: Giving users advanced warning when opening a new window
    w3.org · Checked

YOUR QUESTION. YOUR DETAILS.

Let’s work through your situation.

Get a tailored answer or help with your next task. Starts at $1, with a quote before you pay.

Ask your own question
← Back to Geez at Work