Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Image src property

Image src property

Image Object Reference Image Object


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.

Syntax

imageObject.src=

URL


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the src attribute


Example

Example



Try it »


Image Object Reference Image Object