```
[Try it out Β»](
## Related Pages
HTML Reference Manual: [HTML \\Prop Img Src
# HTML DOM Image src Property
## Definition and Usage
The src property sets or returns the value of the src attribute of an image.
The src attribute specifies the URL of an image.
## Grammar
Set the src property:
```html
imageObject.src = URL
```
Return the src property:
```html
imageObject.src
```
Property Value:
| Value | Description |
| :---- | :---------- |
| URL | The URL of the image. Possible values: - Absolute URL - points to another website (e.g., src="http://www.example.com/image.gif") - Relative URL - points to a file within a website (e.g., src="image.gif") |
## Technical Details
| | |
| :------------ | :----------------------------------------------------------- |
| Return Value: | A string representing the URL of the image. |
## Example
Change the URL of an image:
```html
```
[Try it out Β»](
## Related Pages
HTML Reference Manual: [HTML \\
src attribute](
```
```
[Try it out Β»](
## Related Pages
HTML Reference Manual: [HTML \\
YouTip