HTML Validator: Attribute alt not allowed
Question by Guest | Last update on 2023-12-03 | Created on 2018-02-26
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.
Related Topics
CSS: Include CSS Stylesheets in HTML
Tutorial | 0 Comments
jQuery: Read and Change Data Attribute Value
Tutorial | 0 Comments
HTML: Difference between ID and CLASS
Info | 0 Comments
Delphi/Lazarus: Is the ALT, SHIFT or CTRL key pressed?
Tutorial | 0 Comments
HTML5 Validator: Bad value "" for attribute "action" on element "form": Must be non-empty
Question | 2 Answers
Textarea Maxlength: Limit Maximum Number of Characters in Textarea
Tutorial | 3 Comments
HTML: Preassign HTML Form with Data
Tutorial | 0 Comments
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 article on askingbox.com. That’s how it’s done.
Just take the title attribute instead of the alt attribute.
So, for your example:
In the browser, the title attribute is also displayed on a mouseover and the validator will no longer complain.
Last update on 2023-12-03 | Created on 2018-02-26