Hi,

I was wondering if was possible to put an alt label over text(So that when I hover over it it tells me something about the link). I have been able to do it with images but I have some links on my site that are in text that arent very clear on their links/destination.

Thanks :)

Dani AI

Generated

Short answer: the tooltip approach mentioned by and confirmed by will show a hover hint, but it has important limits. The title attribute produces a simple advisory tooltip on many desktop browsers, but it is not the same as an image alt and should not be relied on for essential information (MDN: title attribute).

Why that matters: tooltips created by title are often invisible to mobile users (no hover), and many assistive technologies either ignore title or expose it inconsistently. Keyboard-only users may never trigger the tooltip. For accessible, reliable hints use ARIA-friendly patterns or visible text; the WAI-ARIA Authoring Practices describe accessible tooltip behavior and alternatives (WAI-ARIA tooltip pattern).

Practical recommendations for and others:

  • Prefer clear, descriptive link text first — make the destination obvious without hovering.
  • Use supplemental descriptions only for non-essential extra detail.
  • For screen-reader-accessible supplemental text, use aria-describedby pointing to a visually hidden element. Example pattern:
<a href="/manual.pdf" aria-describedby="desc-manual">User manual</a>
<span id="desc-manual" class="sr-only">Download the user manual (PDF, 3.2 MB)</span>

.sr-only {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

SEO/accessibility note: as said, alt attributes belong on images and are important for accessibility and image search; do not substitute title in place of alt (MDN: img alt). Use title only for small, non-critical hints and prefer visible or ARIA-based descriptions for anything essential.

Recommended Answers

All 4 Replies

What software are you using to build/edit your website?

The way to do it is like this:

<a href="index.html" title="The main page of a website">Home</a>


I hope this example helps. It gives you a little pop up box with the info like alt text would do for an image. :)

yup mineko solved it. its not an alt label in the test its called the title tag. just add title="text u want to display" thts it

Hi

Make sure you write 'rich descriptions' in your alt labels' as Google values Alt attributes in SEO (more and more).

Grtz J

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.