English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The required src attribute specifies the URL of the image, when the web page is loaded; at that time, the browser retrieves the image from the web server and inserts it into the page.
Image tags are as follows:
<!DOCTYPE html> <html> <head> <title>HTML: <img> src attribute - Basic Tutorial Site oldtoolbag.com</title> <body> <img src="haha.gif" alt="haha face" width="42" height="42"> </body> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the src attribute.
The required src attribute specifies the URL of the image.
Note: When a webpage loads; that is when the browser fetches the image from the web server and inserts it into the page. Therefore, make sure that the image is actually located in the same position relative to the webpage, otherwise your visitors will get broken link icons. If the browser cannot find the image, it will display a broken link icon.
None.
<img src="URL">
Value | Description |
---|---|
URL | Image URL. Possible values: Absolute URL - Points to another website (such as SRC = "http:")//www.example.com/image.gif" Relative URL - Points to a file within a website (such as SRC = "Image.gif") |