Which attribute is used to provide an alternative text for an image in HTML?

  • alt
  • href
  • src
  • title
The alt attribute is used to provide alternative text for an image in HTML. This text is displayed if the image fails to load or for accessibility purposes, allowing screen readers to describe the image to visually impaired users.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *