VOOZH about

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

⇱ HTML <input> src Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <input> src Attribute

Last Updated : 26 May, 2026

The src attribute is used to specify the path of an image for an <input type="image"> element. It displays the image as a clickable submit button.

  • Defines the URL or path of the image to be displayed.
  • Used only with <input type="image">.
  • Allows images to work as form submit buttons.

Syntax: 

<input src="URL">

Attribute Values: It contains a single value URL that specifies the link of the source image. There are two types of URL links which are listed below: 

  • Absolute URL: It points to another webpage.
  • Relative URL: It points to other files of the same web page.


Comment
Article Tags: