" ALT"图像属性和“标题” HTML5中所需链接的属性? [英] "alt" attribute on images and "title" attribute on links required in HTML5?
问题描述
我和我们公司的其他开发人员正在努力争取title和alt属性。
在过去,我们为了SEO目的添加了标题-Tags到所有链接(尽管其中一些是关于可用性的讨论)和alt - 在每个图像上标记网站,因为HTML4规范是这样说的。
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.
- title和alt - 标签仍然必需?
- 如果不需要,他们是否仍然对SEO产生影响?
推荐答案
检查HTML规范以查看/不需要:
Check the HTML specification to see what is/isn’t required:
a
element: The (global)title
attribute is not required.
img
element : alt
属性(例外情况)。
img
element: The alt
attribute is required in most cases (exceptions).
(有关SEO效果的问题在Stack Overflow上是偏离主题的。可以通过网站管理员SE 询问他们。)
(Questions about the SEO effect are off-topic on Stack Overflow. They can be asked on Webmasters SE.)
这篇关于" ALT"图像属性和“标题” HTML5中所需链接的属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!