HTML provides two main ways to add descriptive text to page elements: the alt
attribute, and the title
attribute. While these two attributes may appear to work in a similar way, they have quite different purposes. This article takes a look at these two attributes, explores their similarities and differences, and shows how to use both attributes correctly.