The visible link text should usually explain the destination. The title attribute may supply optional extra information, but it is unreliable as the only label. The important question is always where the link leads and whether the person reading the page can predict it.
What You Need to Know
Tooltips are not consistently available to touch-screen or keyboard users. A descriptive visible label works better for everyone.
Links are the pathways through a website. The words on a link should help someone choose where to go before clicking it.
Example: See It in Action
This example keeps the idea small. Copy it carefully, then follow the explanation instead of guessing what the browser will do.
This is a short HTML fragment. To try it as a webpage, put it inside the body element of a complete HTML document.
<a href="materials.html" title="Course material files">
Download the course materials
</a>
<p>The visible label does the main explanatory work.</p>
Let’s Understand the Example
- An a element becomes a working link when it has an href. Its visible text should tell readers where they will go.
- A p groups a paragraph of related text. Start another paragraph for a new thought.
- Href contains the destination of a link. A value starting with # points to an id on the same page.
- Title adds advisory information, but it is not a substitute for readable visible labels.
The first example link points to materials.html. Check whether that destination exists relative to the document. A link changes where readers go; it does not perform an action such as saving a form.
What Should You See?
You should see a link named “Download the course materials”. Selecting it leads to materials.html when that destination exists. Try it with the mouse and the keyboard.
Imagine this link is read out of context. Would its text still explain the destination? Rename unclear links before trying to make them look nicer with CSS.
Try It Yourself
- Remove the title attribute and see whether the link text remains understandable.
- Save your changes, open or refresh the page, and compare the result with the original example.
- Tell a friend what your change did. If you are not sure, undo it, refresh the page, and compare.
Common Beginner Mistakes
- Replacing a useful visible label with Read more and hiding the real meaning in title.
- Avoid dead links, empty href values and clickable-looking text without a real destination.
Key Takeaways
- The visible link text should usually explain the destination.
- An a element becomes a working link when it has an href. Its visible text should tell readers where they will go.
- Tooltips are not consistently available to touch-screen or keyboard users. A descriptive visible label works better for everyone.