Day 8: Alt Tags or Image Tags
Now that you know how important it is to perfectly put up a page title for a webpage, let us talk about its content. The content of the page is the most decisive part for it to get ranked by Google. The first thing in the content that catches the attention of the reader is the images on it. Images convey a lot about the content. But if for some reason these images cannot be rendered by the browser, say slow internet connection or browser takes time to load, Then the user might think there are no images and may immediately lose interest in your content. Content seems to be boring without any interactive or related image. Here comes the role of Alt Tags.
Alt tag, also called image tags or alt attribute, is an HTML Code that gets displayed on the screen in the place of the image when the image cannot be rendered. The alt tag should be relevant to the image so that the user can get an idea what might be there in the image. Search engines sometimes cannot interpret the images on your webpage. Thus, alt tags serve as an alternative for images for these search engines.

Some important tips to keep in mind while writing down an alt text:
1. In the case of an e-commerce site, the alt tag should be the same keyword as for the product page. This helps in product page optimization for site speed.
2. instead of being very long and descriptive with alt texts, keep it short and up to the point.
3. Do not stuff your alt text with keywords, this is considered to be a bad practice by Google.
4. Do not compromise your page titles and meta tags for alt tags. Alt tags are mainly helpful for pages that have more images and less content.
Alt tags are mainly beneficial for the screen readers. Screen readers are browsers that are used by blind or visually impaired people. If you have any images on your page, the browsers will read out the alt text to such people to tell them what is there in the image. Suppose there is a button on your page for burying a product. So when a user will drag the mouse cursor to that button, the alt tag will show up with the text “Buy this product” or any other relevant text.
The relation between SEO and Alt tags:
Google always motivates to put up great alt tags. If we talk about a WordPress site, for instance, it has a plugin called Yoast SEO (we discussed it briefly in the previous article). This plugin makes sure that your page has at least one image that has your focus keyword as the alt-text. This definitely does not means that you do keywords stuffing. Just one focus keywords are sufficient to get your page indexed by Google.

In the Yoast SEO plugin, it tells you when none of your images have an alt tag.
How long should be an Alt tag?
An idle alt tag should be 125 characters long or less.
For example, If we have to write an alt tag for an image that has a girl wearing a skirt holding a balloon with red polka dots, the alt tags can be-
Okay- 
Better – 
Best- 
How to add an alt tag?

This is the main HTML code for adding an alt tag to an image.

Benefits of Alt tags:
1. It is most important for visually impaired people. They cannot see your image so the alt tag is read to them
2. Instead of showing an empty space, your alt tag will be displayed in case the image is not rendered.
3. It serves as an image description to search engine crawlers, thus helping in better indexing of your page.
Now that your page is ready with page titles and image tags, it is important to work towards its search engine ranking. Here meta tags play an important role. We will be discussing meta tags in our next day challenge.