VOOZH about

URL: https://www.geeksforgeeks.org/html/html-input-alt-attribute/

⇱ HTML <input> alt Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <input> alt Attribute

Last Updated : 25 May, 2026

The HTML <input> alt attribute provides alternative text for an image used in an input element. It is mainly used with type="image" to display text if the image cannot be loaded.

  • Provides alternative text for image input elements and improves accessibility.
  • Mainly used with <input type="image"> elements.
  • Displays descriptive text when the image cannot be loaded.

Syntax:

<input type="image" src="submit.png" alt="Submit Button">

Attribute Values: It contains single value text which is used to specify the alternative text for input if the image is not displaying. 

Comment
Article Tags: