◦ Comprehensive security
◦ 24/7 support
WordPress Guide → SEO → Title Attribute
Title attribute in WordPress: What it is and how to add it
Ever hovered over a link or image and seen a small popup with extra info? That’s the title attribute at work. In WordPress, it’s a small but powerful tool that can improve accessibility, enhance user experience, and even support your SEO strategy.
Let’s break down how it works, where to use it, and how to start using it on your WordPress site.
Get fast, reliable hosting for WordPress
Power your site with the industry’s fastest, most optimized WordPress hosting
What is the title attribute in WordPress?
The title attribute is a basic HTML feature that lets you add extra context to elements like links, images, and buttons. Most commonly, it shows up as a tooltip (a little popup box) when a user hovers over the element.
In WordPress, you can add title attributes to menu links, image elements, or any other content you insert with HTML. While it doesn’t change how your page looks, it provides behind-the-scenes value by helping users and screen readers understand what an element does.
How it appears on the front end
When a title attribute is present:
- Desktop users will usually see a small tooltip when they hover their mouse over the element.
- Mobile users typically don’t see tooltips, since there’s no hover state.
- Screen readers may or may not announce it depending on the browser and device.
That makes it useful for quick hints, but not a replacement for more robust accessibility tools like ARIA labels or alt text.
Why use the title attribute?
While it’s not always required, the title attribute can make your content more informative and accessible.
- Accessibility: It gives extra context for users with screen readers or cognitive impairments, especially on buttons or icons that aren’t self-explanatory.
- User experience: It provides instant help for users who hover over links or images, improving navigation and clarity.
- SEO: It can reinforce keyword themes or page relationships, although it doesn’t carry much direct SEO weight like headings or alt text do.
Used well, it supports your overall site clarity and professionalism.
Where you can use title attributes in WordPress
WordPress supports title attributes in a few key places. Here’s how to add them where they matter most.
1. Navigation menus
WordPress has a built-in option to add title attributes to individual menu items—you just need to enable it first.
- Go to Appearance > Menus in your dashboard.
- Click the Screen Options tab at the top right of the page.
- Check the box labeled Title Attribute to reveal this field in your menu items.
- Expand any menu item. You’ll now see a Title Attribute field.
- Type your tooltip text here. This will appear on hover when someone mouses over the menu link.
- Click Save Menu to apply your changes.
Tips for writing good title attributes in menus:
- Keep it short and descriptive, like “Go to our homepage” or “See our latest blog posts.”
- Don’t just copy the link label—that’s redundant and not helpful.
- Avoid keyword stuffing. This isn’t the place to game SEO.
2. Images in the Media Library
WordPress’s Media Library includes a Title field, but whether or not that becomes a title attribute on the front end depends on your theme.
- Go to Media > Library.
- Click on the image you want to edit.
- In the right-hand sidebar, find the Title field and enter your tooltip text.
- Click Update to save changes.
By default, most WordPress themes do not include the title attribute in image output. You may need to:
- Use a plugin that enables this behavior, or
- Edit the image’s HTML manually when inserting it into a post or page.
Also important: Title is not the same as Alt text.
- Alt text is for screen readers and SEO, and it appears when images fail to load.
- Title attribute is for hover tooltips and extra context. You can use both.
3. HTML in posts and pages
If you’re comfortable editing a little HTML, you can add title attributes to any link or image directly inside your posts or pages.
Classic Editor:
- Switch to the Text tab and manually add the title=”” attribute inside your anchor (<a>) or image (<img>) tags.
Block Editor (Gutenberg):
- Add a Custom HTML block or use the block’s link settings panel.
- For images, choose the block, click Advanced, and look for a place to add custom attributes (or edit the HTML).
Examples:
<a href=”https://example.com” title=”Visit our homepage”>Home</a>
<img src=”image.jpg” title=”Our team at the 2024 conference” alt=”Team photo”>
Keep your title text relevant and avoid repetition with other attributes.
How to add title attributes using plugins
If your theme doesn’t support title attributes, or you want to automate their use, there are several plugins that can help.
Recommended plugins
- Bulk Auto Image Title Attribute (BIGTA): Automatically adds title attributes to images based on their filename or alt text. Helpful for large media libraries.
- WP Accessibility: Includes several accessibility features, including support for title attributes and better link labeling.
These plugins are especially useful if:
- You want to apply title attributes to lots of existing content.
- Your theme strips them out by default.
- You’re working on accessibility improvements site-wide.
How to add title attributes with code (for developers)
If you’re customizing a theme or building your own, you can control how title attributes are used directly in your templates.
Example for links:
<a href=”<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>”><?php the_title(); ?></a>
To add title attributes to menu items using a filter:
add_filter( 'nav_menu_link_attributes', 'add_title_to_menu_items', 10, 3 ); function add_title_to_menu_items( $atts, $item, $args ) { $atts['title'] = $item->attr_title; return $atts; }This gives you full control over what gets rendered in your front-end HTML.
Common mistakes to avoid
- Using title attributes instead of alt text: Alt text is required for images. Title is optional and secondary.
- Writing overly long tooltips: Most users won’t read more than a few words in a hover popup.
- Repeating visible text: If the menu item says “About,” don’t use a title attribute that just says “About.”
- Relying on it for all accessibility: Title attributes help, but they’re not a replacement for ARIA labels, keyboard navigation, or semantic HTML.
Getting started with the title attribute in WordPress
The title attribute is a small touch that improves your site’s usability, accessibility, and polish. While it won’t overhaul your SEO, it adds helpful context that users (and sometimes search engines) appreciate.
Start by adding title attributes to your main navigation menu and featured images. If your theme doesn’t support them, try a plugin or add them manually with HTML for more control.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy.
Don’t want to deal with server management and maintenance either? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click below to explore options or start a chat with one of our WordPress hosting experts now to get answers to your questions and further guidance.
Additional resources
Comprehensive guide to securing WordPress with ModSecurity
→
This guide provides a comprehensive overview of how to use ModSecurity to enhance the security of your WordPress site.
WordPress robots.txt — a complete beginner’s guide →
Learn how to optimize your WordPress site’s visibility with a properly configured robots.txt file.
Why security matters for WordPress enterprise hosting
→
Use the blog as your guide to attacks to watch out for, security best practices, and steps to improve the WordPress protection you already have.
Originally from Albuquerque, New Mexico, Leslie Bowman has hopped around the country since graduating from undergrad. She focused on English and Latin American History in college and eventually attended graduate school in New York City. There, she developed a passion for short, persuasive arguments. Bowman found a love of copywriting and is now a Senior Copywriter at Liquid Web.