Image Alt Text vs Image Title in WordPress – What’s the Difference?

A lot of content on the web includes 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 an image title, often beginners do not understand the difference and how to use them.

In this article, we will share the difference between image alt text vs image title in WordPress, so you can improve your image SEO.

Using image alt text and title in WordPress

What is the Alt Text and Image Title?

Alt text is short for alternate text. It’s an attribute added to an image tag in HTML. This helps visitors who can’t see the image and search engine bots to understand what an image is about.

Alt text is also shown if the image on your page can’t be found or can’t be displayed for any reason.

The alt text"Bunch of flowers" displays next to a broken image icon

Alt text is different from the image’s title. The title is text that’s displayed in a small popup box when you bring your mouse cursor over the image.

An image with the title text"Flowers from my garden"

Alt tag and image titles are also used to improve the accessibility of your website for those with poor vision or screen reader devices.

The screen reader will read the text of your article and when it comes to an image, it will read the alt text. Depending on the user’s settings, it may also read the title text.

For both accessibility and search engine optimization (SEO), alt text is more important than title text. This is why we strongly recommend including alt text for all your images.

Pro Tip: We recommend using All in One SEO plugin for WordPress to add proper image sitemap and other SEO features to improve your SEO ranking.

How to Add Alt Text to an Image in WordPress

WordPress allows you to easily add alt text for your images. Simply create a new post or page, or edit an existing one, and add an Image block.

If you’re not sure how to add a block or you need some extra help with the block editor, just check out our tutorial on how to use the WordPress block editor.

First, upload your image or drag and drop it into the Image block. You can then set the alt text on the right hand side of the page.

Adding alt text to an image in the WordPress block editor

You can also add alt text to an image by going to Media » Library and clicking on the image to edit it.

Remember, this won’t change the alt text for any instances of that image that you’ve already inserted into posts or pages. However, if you add the image to a post or page after adding alt text here, then the alt text will be included with it.

Viewing or editing the alt text for your image in the WordPress media library

If you’re still using the classic WordPress editor, then you can add image alt text when adding the image.

First, click on ‘Add Media’ above the posting box.

Click'Add Media' in the classic editor to add an image to your post

Either upload the image from your computer or click the ‘Media Library’ tab to view images you’ve already uploaded.

Next, click on the image you want in order to select it, and then type the alt text you want into the ‘Attachment Details’ of your image:

Adding alt text to an image in the classic editor

How to Add Image Title in WordPress

There are two types of title attributes that you can add to your images.

The default WordPress title attribute is not added to the HTML code for the image. It is used internally by WordPress to identify media files.

If you want to add titles to your images, then you need to do this using the Media Library. You can’t currently add a title to an image when editing it in the visual editor.

The title isn’t necessary for image SEO or for users with screen readers. It can be useful in some cases, though, as it lets you provide information when a user brings their mouse over the image.

One thing that’s often confusing for WordPress users, including some experienced users, is that WordPress lets you give images a title. This is completely separate from the image title attribute.

For instance, you’ll see a ‘Title’ field when you edit images in the media library:

Viewing or editing the image's Title in the media library

The ‘Title’ here is used by WordPress to identify the image. When you click the ‘View attachment page’ link at the bottom of the screen, you’ll see the title is used as the title on that page:

Viewing the image's attachment page, with the image title shown

While this may be helpful in some cases, it’s not the same thing as the image’s title attribute. So how do you create that?

In the old classic editor, you can add the title attribute by clicking on an image then clicking the pencil icon:

Editing an image in the WordPress classic editor

You’ll then see the ‘Image Details’ screen. To set the image title attribute, click the little downward arrow next to ‘Advanced Options’ at the bottom:

Click the downward arrow to view the Advanced details for your image

You can then set the image’s title attribute.

Setting the image title attribute in the classic editor

Unfortunately, in the block editor, it’s not quite so easy to edit the image’s title attribute. It’s still possible, though. You can add your image as normal then edit the block as HTML code.

To switch to the HTML view of the block, click ‘More Options’ (the 3 vertical dots) then click ‘Edit as HTML’.

Editing your image as HTML

It might look a bit confusing, but all you need to know is that the <img> tag is what creates your image. You’ll see your image’s filename there.

The HTML code for the image

To add the title attribute to your image, you simply need to add title="Your image title here" to the image tag like this:

<img src="" title="Bunch of daffodils" alt="A lovely bunch of daffodils" class="wp-image-257"/>

It doesn’t matter where in the image tag you put the title attribute.

After entering the title, you’ll see a message warning that “This block contains unexpected or invalid content.”

Warning message saying that the block contains unexpected content

Simply click the ‘Convert to HTML’ button and your image block will be converted to HTML code. It will still display on your site exactly as before, but you won’t be able to edit the image using the block editor.

Why and How You Should Use Alt Text and Image Title

We strongly recommend using alt text for all images. Here on WPBeginner, we also add a title to all images. However, this is less important than the alt text.

Alt text is important because Google focuses on it as a ranking factor for images. It is also used by screen readers to help visitors with impaired vision to fully engage with your content.

It’s important not to stuff keywords into alt and title tags. Make them descriptive and helpful, so that they’re useful for visitors who need them. You can use your keywords where relevant, but don’t overdo it.

For example, if you’re writing an article about the best WordPress hosting, then your target keyword could be “best WordPress hosting”.

You might have a screenshot in your article showing users how to set up an account with a popular web host like Bluehost.

Here are some possible options for your alt text for that image:

  • “Account setup” – this is not very descriptive and also doesn’t include anything related to your keyword
  • “Best WordPress hosting, WordPress hosting, best web hosting for WordPress” – this doesn’t describe the image and is stuffed with keywords
  • “Setting up a WordPress hosting account” – this is much better as it’s descriptive and uses part of the keyword in a natural and appropriate way

We hope this article helped you understand the difference between image alt text and image title in WordPress. You may also want to take a look at our beginner-friendly guide on how to optimizing images for the web to speed up your site, and our comparison of the best WordPress SEO plugins & tools to improve your rankings.

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