These two attributes are often confused, but in fact, one is intended for machines and special circumstances, while the other is intended for people. Once you understand the difference, you’ll know when to fill in one, when to fill in the other, and when to fill in both.
I. alt: Alternative text for images
The "alt" attribute is included in the `img` tag and serves as a text alternative in case the image cannot be displayed. When internet speeds are slow, the image is unavailable, or the user is browsing with a screen reader, this text is what they will see.
For search engines, this is the primary basis for understanding what an image depicts—since machines currently have limited ability to interpret images, they rely on this line of text.
Therefore, product images, case study images, and flowcharts should all include alt text—and it should be specific. Writing “Image 1” or “banner” is as good as not writing anything; writing “Actual photo of a DN50 stainless steel flange” provides meaningful information.
II. Title: Tooltips
The `title` attribute is a general-purpose attribute that can be added to any element; when the mouse hovers over it, a tooltip appears. Its purpose is to provide additional information, not to fill space.
The prevailing view in the industry is that search engines hardly ever use the `title` attribute as a ranking factor. In the quality checks conducted by webmaster tools and search resource platforms, the focus is primarily on whether the `alt` attribute is present, rather than on the content of the `title` attribute. Relying on it to increase keyword density is mostly a waste of time.
III. When Is It Necessary to Include a Title?
Here are three scenarios worth adding:
- The image itself contains a link. When the user hovers over it, a tooltip appears, allowing them to determine whether clicking it will take them to the page they want, thereby reducing the number of invalid clicks.
- There is no caption next to the image. The image stands alone, so readers don’t know what it is and have to rely on the tooltip for context.
- The description text is truncated. Only half of the titles in the list are displayed; the "title" field is auto-completed.
Conversely, if an image has no link but is accompanied by a complete text description, there’s no need to repeat the description.
IV. A Few Common Mistakes
First, the two attributes are written exactly the same way. Both say “product image,” which is a waste of an opportunity to convey different information. The `alt` attribute describes what’s in the image, while the `title` attribute explains what happens when you click on it—each serves a distinct purpose.
Second, stuffing keywords into the alt text. Things like “Wuxi Website Development Company_Wuxi Website Creation_Website Design Quotes”—screen reader users will find this confusing, and search engines will treat it as spam.
Third, avoid forcing alt text on decorative images. For purely decorative elements such as separators and background textures, leaving the alt attribute empty (alt="" ) is actually more standard practice, as screen readers will skip them entirely.
Fourth, getting the nesting order mixed up when linking to a set of images. If you place an `img` element inside an `a` tag, the tooltip that appears on hover is usually the `title` attribute of the `img` itself; the `title` attribute of the outer `a` tag may not take effect. To be on the safe side, it’s better to place the description directly on the `img` element when writing the code.
Neither of these attributes has a major impact on the big picture, but they are part of the page’s details. When a host of details are done right, the overall quality of the entire site improves.
Before we launch a site, we run a check and add alt text to any images that are missing it—this is the easiest thing to overlook, but also the easiest to fix.
For web design in Wuxi, turn to Zongye Technology.

