"alt" attribute on images and "title" attribute on links required in HTML5?
Asked Answered
C

3

4

Me and other developers at our company are struggling with "title" and "alt" attributes. In the past, we added "title"-Tags to all links for SEO purposes (although some of them were annoing talking about usability) and "alt"-Tags on every image on the site, because HTML4 spec said so.

  • Are "title" and "alt"-Tags still required?
  • If they're not required, do they still have effects on SEO?
Cobwebby answered 18/1, 2014 at 16:29 Comment(0)
L
5

Check the HTML specification to see what is/isn’t required:

(Questions about the SEO effect are off-topic on Stack Overflow. They can be asked on Webmasters SE.)

Laidlaw answered 18/1, 2014 at 17:4 Comment(0)
S
0

alt attribute on img is always required except when it can't be provided (e.g. when users are allowed to upload images and you can't ask them to upload an alt text...)'; why alt is required, why is good to be provided and when you can leave empty string as value examples here

title attribute on link element is not required; check out link attributes

Swine answered 20/1, 2014 at 16:43 Comment(0)
T
-3

Yes In this version it is necessary too because of HTML5 Validation and Search Engine Optimization.

Treacy answered 18/1, 2014 at 16:35 Comment(2)
Are you sure? Can you name any source? I tried to validate a Test Page without title-attributes and it validates on validator.w3.org - and title Tags on navigation a-Tags are annoying in my opinionCobwebby
here is an another option to validate your file, just check on Show Source and revalidate page after that copy the code below the error link and paste it to dreamweaver, in dreamweaver there is an option to validate your page or code just play it and look out your changes... very simple to get any page validate weather it is html5 or any other version.Treacy

© 2022 - 2024 — McMap. All rights reserved.