HTML <img> src Attribute Read Courses Improve Improve Improve Like Article Like Save Article Save Report issue Report The <img> src attribute is used to specify the URL of the source image. It points to the location of the image file that the browser should display on the webpage. Syntax:<img src="URL">Attribute Values: It contains a single-value URL that specifies the link to the source image. There are two types of URL links which are listed below: Attribute Values Description Absolute URL It points to another webpage. Relative URL It points to other files on the same web page. Example: This example illustrates the use of the image src attribute with an HTML document. html <!DOCTYPE html><html> <head> <title> img src Attribute </title></head> <body> <h1>GeeksforGeeks</h1> <h2>HTML <img> src Attribute</h2> <img src="https://media.geeksforgeeks.org/wp-content/uploads/20190506164011/logo3.png" alt="GeeksforGeeks logo"></body> </html> Output: Related DOM Property:HTML DOM Image src Property Supported Browsers: Google Chrome 1Edge 12 Firefox 1Safari 15Opera 1 Last Updated : 12 Jan, 2024 Like Article Save Article Previous HTML | <tr> valign Attribute Next PHP | Ds\Map diff() Function Share your thoughts in the comments Add Your Comment Please Login to comment...