wordpress图片插件_WordPress中的图片替代文字与图片标题-有何区别?

wordpress图片插件

A large amount of web content consists of images however not many website owners optimize their images for speed or better search rankings. Even though WordPress comes with the option to add alt text and image title, often beginners do not understand the difference and how to use them. In this article, we will show you the difference between image alt text vs image title in WordPress.

大量的Web内容由图像组成,但是没有多少网站所有者为提高速度或提高搜索排名来优化其图像。 即使WordPress带有添加alt文本和图像标题的选项,但初学者常常不了解它们的区别以及如何使用它们。 在本文中,我们将向您展示WordPress中的图片替换文字与图片标题之间的区别。

影片教学 (Video Tutorial)

演示地址

If you don’t like the video or need more instructions, then continue reading.

如果您不喜欢该视频或需要更多说明,请继续阅读。

什么是替代文字和图片标题 (What is Alt Text and Image Title)

Alt text or alternate text is an attribute added to an image tag in HTML. This text appears inside the image container when the image can not be displayed. It helps search engines understand what an image is about. Alternate text is also very helpful in case images on a page cannot be found.

替代文字或替代文字是添加到HTML中图像标签的属性。 当无法显示图像时,此文本显示在图像容器内。 它可以帮助搜索引擎了解图像的含义。 如果找不到页面上的图像,备用文本也很有用。

Alternate text displayed in a broken image container

Image title is another attribute that can be added to the image tag in HTML. It is used to provide a title for your image. The text you enter inside the title tag will not be shown to user when a image cannot be displayed. Instead, it is displayed in a popup when a user takes their mouse over to an image.

图像标题是可以添加到HTML中的图像标签的另一个属性。 它用于为图像提供标题。 当无法显示图像时,在标题标签内输入的文本将不会显示给用户。 相反,当用户将鼠标移到图像上时,它将显示在弹出窗口中。

Title attribute displayed over the image in popup text

Alt tag and image titles are also used to improve accessibility of your website for those with poor vision or screen reader devices. A screen reader will read the entire text article and when it comes to an image, then it will say Image: Title XYZ. This allows the user to know why you added the image there even if they cannot see it.

Alt标签和图像标题还用于为视力不好或屏幕阅读器设备较弱的人改善您的网站的访问性。 屏幕阅读器将阅读整个文本文章,当涉及到图像时,它将显示“ Image:Title XYZ”。 这样,即使用户看不到图像,用户也可以知道为什么在其中添加了图像。

如何在WordPress中向图像添加替代文本 (How to Add Alt Text to an Image in WordPress)

WordPress allows you to add Alt text for your images when you upload them using the built-in media uploader.

使用内置媒体上传器上传图像时,WordPress允许您为图像添加替代文本。

Adding alt text while uploading a image in WordPress

You can also add alt text to an image by visiting Media » Library and clicking on the Edit link below the image.

您还可以通过访问媒体»库 ,然后单击图像下方的编辑链接来向图像添加替代文本。

Adding alternate text by editing a file in media library
如何在WordPress中添加图片标题 (How to Add Image Title in WordPress)

When you are uploading an image using the built in WordPress media uploader, you will see a title field. This title field is used by WordPress to handle your media files and should not be confused with the title attribute used inside an image.

使用内置的WordPress媒体上传器上传图像时,您会看到标题字段。 WordPress使用此标题字段来处理您的媒体文件,并且不要与图像中使用的title属性混淆。

Title in the media uploader is not the title attribute used inside img tag

The title you add while uploading an image is only used by WordPress media library to display the list of your media files.

上载图像时添加的标题仅由WordPress媒体库用于显示媒体文件列表。

While this title will help you locate media files in WordPress media library, it is not the title attribute that we are talking about. Here is how you would add the title attribute to your images in WordPress.

虽然此标题可以帮助您在WordPress媒体库中找到媒体文件,但这不是我们正在谈论的title属性。 这是在WordPress中将title属性添加到图像的方法。

If you are using the visual post editor, then you need to click on the image and then click the edit button on the image.

如果使用可视化帖子编辑器,则需要单击图像,然后单击图像上的编辑按钮。

Editing an image inside WordPress visual editor

This will bring up the image edit popup screen where you need to click on the Advanced Options. This will display the option to add image title attribute.

这将弹出图像编辑弹出屏幕,您需要在其中单击高级选项。 这将显示添加图像标题属性的选项。

Adding image title attribute in WordPress using visual editor

For those users who are not afraid of editing a little bit of HTML. Simply switch to the Text editor, and add title attribute to your image tag like this:

对于那些不怕编辑一点HTML的用户。 只需切换到文本编辑器,然后将title属性添加到图像标签即可,如下所示:


<img class="alignleft size-medium wp-image-2204" src="http://www.example.com/wp-content/uploads/2014/10/bike.jpg" alt="alternate text for image" width="300" height="199" title="A proper title attribute" />

Alternatively, you can use a plugin called Restore Image Title which uses the title field in the uploader as the title attribute of the images.

另外,您可以使用一个名为“还原图像标题”的插件,该插件将上传器中的标题字段用作图像的标题属性。

为什么以及如何使用替代文字和图像标题 (Why and How You Should Use Alt Text and Image Title)

We recommend our users to use both alt text and image title with their images. One obvious advantage is that it helps search engines discover your images and display them in image search results. The other advantage is that these tags improve the accessibility of your site and explain your images to people with special needs.

我们建议用户在图片中同时使用替代文字和图片标题。 一个明显的优点是,它可以帮助搜索引擎发现您的图像并将其显示在图像搜索结果中。 这些标签的另一个优点是可以改善您网站的可访问性,并向有特殊需求的人解释您的图片。

Search engines, particularly Google claims that they only focus on alt tag as a ranking factor for images. However, this does not mean that they completely ignore the title attribute. Try adding different texts in both attributes using keywords that describe your images.

搜索引擎,特别是Google声称,它们仅关注alt标签作为图像的排名因素。 但是,这并不意味着它们完全忽略了title属性。 尝试使用描述图像的关键字在两个属性中添加不同的文本。

Also remember do not stuff too many keywords into alt and title tags. Instead, write descriptive and helpful texts that actually describe the image.

还请记住不要在alt和title标签中填充太多关键字。 而是编写实际描述图像的描述性和有用的文本。

We hope this article helped you understand image alt text and image title in WordPress. You may also want to take a look at our guide on fixing the common image issues in WordPress.

我们希望本文能帮助您了解WordPress中的图片替代文本和图片标题。 您可能还需要看一下有关修复WordPress中常见图像问题的指南。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Google+.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterGoogle+上找到我们。

翻译自: https://www.wpbeginner.com/beginners-guide/image-alt-text-vs-image-title-in-wordpress-whats-the-difference/

wordpress图片插件

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值