HTML <img> src Attribute Last Updated : 11 Jul, 2025 Comments Improve Suggest changes 6 Likes Like 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 Comment J jit_t Follow 6 Improve J jit_t Follow 6 Improve Article Tags : Web Technologies HTML HTML-Attributes Explore HTML BasicsHTML Introduction5 min readHTML Editors5 min readHTML Basics7 min readStructure & ElementsHTML Elements5 min readHTML Attributes8 min readHTML Headings4 min readHTML Paragraphs5 min readHTML Text Formatting4 min readHTML Block and Inline Elements3 min readHTML Charsets4 min readListsHTML Lists5 min readHTML Ordered Lists5 min readHTML Unordered Lists4 min readHTML Description Lists3 min readVisuals & MediaHTML Colors11 min readHTML Links Hyperlinks3 min readHTML Images7 min readHTML Favicon4 min readHTML Video4 min readLayouts & DesignsHTML Tables10 min readHTML Iframes4 min readHTML Layout4 min readHTML File Paths3 min readProjects & Advanced TopicsHTML Forms5 min readHTML5 Semantics6 min readHTML URL Encoding4 min readHTML Responsive Web Design11 min readTop 10 Projects For Beginners To Practice HTML and CSS Skills8 min readTutorial ReferencesHTML Tags - A to Z List15+ min readHTML Attributes Complete Reference8 min readHTML Global Attributes5 min readHTML5 Complete Reference8 min readHTML5 MathML Complete Reference3 min readHTML DOM Complete Reference15+ min readHTML DOM Audio/Video Complete Reference2 min readSVG Element Complete Reference5 min readSVG Attribute Complete Reference8 min readSVG Property Complete Reference7 min readHTML Canvas Complete Reference4 min read Like