Images are used in a lot of web material. Many website owners, on the other hand, do not optimize their photos for speed or higher search ranks.
Despite the fact that WordPress allows you to add alt text and an image title, many beginners are unaware of the differences and how to use them.
We’ll explain the difference between image alt text and image title in WordPress in this article so you can boost your picture SEO.
What are the image title and alt text?
Alternate text is referred to as alt text. It’s an HTML attribute that’s added to an image tag. This makes it easier for visitors who can’t see the image and search engine bots to figure out what it’s about.
If an image on your page cannot be retrieved or shown for any reason, alt text is displayed instead.
The alt text is not the same as the image’s title. When you move your mouse cursor over the image, a little popup box appears with the title.
The alt tag and image names are also used to make your website more accessible to people with low vision or who use screen readers.
The text of your article will be read aloud by the screen reader, and the alt text for images will be read aloud by the screen reader. It may also read the title text, depending on the user’s preferences.
Alt-text is more significant than title text for both accessibility and search engine optimization (SEO). As a result, we strongly advise that you provide alt text for all of your photographs.
Pro Tip: To increase your SEO ranking, we recommend utilizing the All in One SEO plugin for WordPress to include a good picture sitemap and other SEO features.
In WordPress, how do I add alt text to an image?
You can easily add alt text to your photographs in WordPress. Simply add an Image block to a new post or page, or change an existing one.
To begin, upload or drag and drop your image into the Image block. The alt text can then be set on the right side of the page.
You may also update an image’s alt text by going to Media » Library and clicking on the image.
Keep take mind that this will not update the alt text for any images you’ve already used in posts or pages. If you add the image to a post or page after entering alt text here, the alt text will be included in the post or page.
Using the old WordPress editor, you can add picture alt text when you upload the image.
To begin, select ‘Add Media’ from the drop-down menu above the posting area.
You can either upload an image from your computer or examine images you’ve previously posted by going to the ‘Media Library’ page.
After that, select the image you want and put the alt text you want into the ‘Attachment Details’ section of your image:
How to Add Image Title in WordPress
There are two types of title attributes that you may use to add to your photos in WordPress.
The image’s HTML code does not include the typical WordPress title element. WordPress uses it to identify media files internally.
If you wish to add titles to your photographs, you’ll need to use the Media Library to do so. When modifying an image in the visual editor, you can’t currently add a title.
The title isn’t required for picture SEO or for screen reader users. However, in other circumstances, it might be advantageous because it allows you to display information when a user hovers their mouse over an image.
The ability to give photos a title is something that many WordPress users, including some seasoned users, are perplexed by. This is not to be confused with the picture title attribute.
When editing images in the media library, for example, you’ll notice a ‘Title’ field:
WordPress uses the ‘Title’ field to identify the image. The title is used as the title on that page when you click the ‘View attachment page’ link at the bottom of the screen:
While this is sometimes useful, it is not the same as the image’s title attribute. So, how do you go about doing that?
By clicking on a picture and then clicking the pencil icon in the old classic editor, you can add the title attribute:
The ‘Image Details’ panel will appear after that. To change the picture title attribute, go to the bottom of the page and click the tiny downward arrow next to ‘Advanced Options’:
After that, you can change the image’s title attribute.
Unfortunately, editing the image’s title attribute in the block editor is not as simple. But it’s still a possibility. You can upload your image normally and then edit the block using HTML code.
Click ‘More Options’ (the three vertical dots), then ‘Edit as HTML’ to move to the HTML view of the block.
It may appear perplexing at first, but all you need to know is that the img> tag is what generates your image. You’ll see the filename of your image there.
Simply add title=”Your picture title here” to the image tag like this to add the title property to your image:
1
|
<img src="http://www.yourwebsitename.com/wp-content/uploads/2020/03/daffodils-bunch-vase.jpg" title="Bunch of daffodils" alt="A lovely bunch of daffodils" class="wp-image-257"/> |
The title attribute can be placed anywhere in the image tag.
You’ll receive a popup informing you that “This block contains unexpected or invalid material” once you’ve entered the title.
Your image block will be converted to HTML code once you click the ‘Convert to HTML’ button. It will still appear on your site, but you will no longer be able to alter the image using the block editor.
Why and How Should You Use Image Titles and Alt Text?
We strongly advise that all photos have alt text. All photos on WPBeginner have a title as well. This, however, is less significant than the alt text.
Because Google employs alt text as a ranking component for photos, it’s crucial. Screen readers use it to assist visitors with vision impairments in fully engaging with your content.
It’s crucial to avoid stuffing keywords into the alt and title tags. Make them descriptive and helpful so that visitors who require them can find them. You can use keywords when they are appropriate, but don’t go overboard.
If you’re blogging about the greatest WordPress hosting, for example, your goal keyword might be “best WordPress hosting.”
You might include a screenshot in your article that demonstrates how to create an account with a well-known web host like Bluehost.
Here are some possible alt text alternatives for the image:
- “Account setup” – this is not very descriptive and also does not include anything related to your keyword
- “Best WordPress hosting, WordPress hosting, best web hosting for WordPress” – this does not describe the image and is stuffed with keywords
- “Setting up a WordPress hosting account” – this is much better because it is descriptive and uses part of the keyword in a natural and appropriate way
We hope that this post clarified the distinction between image alt text and picture title in WordPress.