00 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.

0Best Answer0 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

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.


Ask your own question or write your own article on askingbox.com. That’s how it’s done.