0

I have this situation on my webpage:

enlace

When you click on the "i" icon you will go to the "ushuaia.php" page, and when you click on the word "Ushuaia" you will go to the same "ushuaia.php" page.

But...

What about the alt text for the icon? It is better for SEO to include an empty alt text (alt="") or to include a text (like alt="Ushuaia"). I don´t want search engines to index the icon as "Ushuaia" because I use this icon on other pages.

Is the following lines good?

<a href="ushuaia.php">
<table><tr>
<td><img alt="" src="/information.png"></td>
<td>Ushuaia</td>
</tr></table>
</a>

(y prefer to use tables instead of div, but it is not the matter)

2 Answers 2

0

Yes, alt="" is the proper way.

Following the W3 recommendation, I'll quote the relevant part:

Decorative images: Provide a null text alternative (alt="") when the only purpose of an image is to add visual decoration to the page, rather than to convey information that is important to understanding the page.

https://www.w3.org/WAI/tutorials/images/

1
  • I would challenge that iconography is actually something that isn't decorative and conveys meaning. So it should be important enough to have alt text. In the above, if the image doesn't render it will create some weird whitespace in the adjacent cell of the table too. Might be more confusing to the user by omitting it. Jan 23 at 0:09
0

Outside of SEO, it would be more beneficial to leverage an alt tag of "information icon". This is an attempt to make your website more accessible, especially since this is a linked item and screen readers will read out the alt text to the user.

Leaving it blank might make it more confusing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.