In the following HTML code, what does the alt attribute do?
alt
<img src="image.jpg" alt="A sample image">
It sets the image title that appears on hover
It provides text that will be displayed if the image can't be loaded
It defines the image's source URL
It sets the image's background color