What is an ALT tag?
Alt text (alternative text) describes how an image appears or functions on a page. Screen readers read aloud alt text to visually impaired visitors, it appears instead of an image if it fails to load, and search engine bots index it to help them better grasp the content of your website.
ALT tags were originally designed to provide an alternative to images for many users. If you use a PDA with images turned off or have accessibility issues (Blind or poor sight are examples), then you would use ALT Tags. They were originally intended to describe the images to which the tags were applied.
It’s Important For Accessibility & SEO
Alt text, also known as “alternative text” or “alt tags,” is a crucial component of search engine optimization (SEO). Alt text is a description of an image that appears when the image cannot be displayed. Search engines use alt text to understand the content of an image and rank it accordingly in search results. Including descriptive and relevant alt text on images can improve the accessibility and usability of a website, as well as its SEO performance.
How do I add alt text to an image in HTML?
Adding alt tags to images is an important aspect of web accessibility and SEO. Here are some steps to add alt tags to images:
- In HTML, add an alt attribute to the <img> tag. For example, <img src=”image.jpg” alt=”image description”>
- If you’re using a modern CMS like WordPress, you can add alt text without having to dig into the HTML code. For example, in WordPress, there’s a field for alt text when adding an image to a page or post
- Write clear, concise image descriptions that accurately describe the content of the image
- Use keywords in your alt tags to improve your SEO
- Don’t use alt tags for decorative images that don’t add any information to the content
How to do it in CMS?
Clicking on an image in the body of a blog post in most content management systems (CMSs) brings up an image optimization or rich text module, where you can create and alter the picture’s alt text.
Avoid Over-Optimization of Alt Tags
While alt tags are an essential component of SEO, it’s important to avoid over-optimization of alt tags. Over-optimization refers to the practice of stuffing alt tags with excessive keywords or phrases in an attempt to manipulate search engine rankings. This can result in a penalty from search engines, as it is considered a black hat SEO technique. Instead, alt tags should be used to provide accurate and concise descriptions of the image’s content, making it easier for users with visual impairments to understand the image and improving the overall accessibility of the website.
Over time, people clocked to the fact that using ALT tags had a benefit regarding SERPs for a site. People began stuffing the ALT tags with all the key phrases they aimed for. This led to the search engines having lots of spammy results.As a result of all this spamming, search engines no longer pay as much attention to ALT tags as they once did.
Stuffing your pages full of 1px x 1px images and filling the ALT tags is not a good way of achieving good results. The search engines will pick up on this as part of their algorithm (You won’t even need to be reported to be discovered) and will likely penalise you for trying to fool them.
ALT tags should only be used as they were intended.
A bad alt tag might look like this…
<img src=”keyword-stuffing-tips.gif” alt=”stuffing pages with keywords will get you in trouble and stuffing is never a good thing because you should not stuff keywords like keyword1 and keyword2 and keyword3 stuffing tips” />
That’s the bad way to do it. The right way to do it might be…
<img src=”keyword-stuffing-tips.gif” alt=”Keyword Stuffing Tips” />