HTML <img> src Attribute (original) (raw)

Last Updated : 11 Jul, 2025

The **** 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:

**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 `

img src Attribute

GeeksforGeeks

HTML src Attribute

GeeksforGeeks logo

`

**Output:

Screenshot-2024-01-10-123911

HTML DOM Image src Property

**Supported Browsers: