0 0 Votes

HTML Validator: Attribute alt not allowed

Question by Guest | 26/02/2018 at 16:29

When I try to validate my website with an HTML Validator, I get the following error:

Attribute alt not allowed on element a at this point

In principle, I have only provided a link with a title, which is displayed on a mouseover:

<a href="http://www.example.com" alt="Text">Link Text</a>

What can I do to prevent this error? I have always done that this way.

ReplyPositiveNegative

Computer Expert

Show Profile | Message
Avatar
0Best Answer
0 Votes

Just take the title attribute instead of the old attribute.

So in your example:

<a href="http://www.example.com" title="Text">Link Text</a>

In the browser, the title attribute is also displayed on a mouseover and the validator will no longer complain.
26/02/2018 at 20:25

ReplyPositive Negative
Reply

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own articles on askingbox.com. How to do.