Skip to main content

Posts

Showing posts with the label Image title tag

How to correctly use alt and title in HTML image tags

Today, I finally put into words a question that had been persistent at the back of my mind for a while… “What's the difference between the alt and title attributes on an image?” You see, I have learned to write HTML well before the title element came along, for the longest time I didn't give it any thought beyond using it for tooltips. alt tags were what mattered—the text is shown if an image isn't shown, and by screen readers. Super important for accessibility. Common practice seems to be to add the title attribute to the <a> tag. But is this best for SEO ? Would there be any harm in adding it to both tags? If not, is there harm in the title text being identical on both? IMAGE ALT TEXT VS. IMAGE TITLE ATTRIBUTES Image optimisation is often overlooked when it comes to SEO, despite the fact that Google has emphasized the importance of it for users and search engines. However, some people may be confused as to how exactly they can optimise their image attrib...