Which attribute is used to add alternative text for an image?

  • alt 
  • href 
  • rel 
  • src 
The alt attribute provides alternative text for an image. This text can be read aloud by screen readers, enabling visually impaired users to understand the content of the image. Additionally, if an image fails to load due to broken links or other issues, the alternative text will be displayed in its place, offering some context about the missing image. It's an essential attribute for accessibility and good web practices. 
Add your answer
Loading...