我想知道在链接图像上实现标题和alt的最好方法是什么。
img-tag可以同时具有title和alt属性,a-tag只能具有title属性。在链接图像时,实现title-attribute的最佳方式是什么?我应该把它同时放在img和a-tag上,还是只放在两个中的一个上?
发布于 2013-01-03 18:59:50
他们有一种不同的方法。title-属性向元素添加描述,alt-属性作为图像的另一种文本表示形式。
<a href="..." title="Click here for more information about VanGogh">
<img src="vangogh.png" alt="Famous painting of VanGogh" />
</a>https://stackoverflow.com/questions/14137464
复制相似问题