Easy Tutorial
❮ Tag Sup Att Table Cellpadding ❯

HTML <img> src Attribute

HTML <img> Tag

Example

The image tag is as follows:


Browser Support

All major browsers support the src attribute.


Definition and Usage

The src attribute of the src tag is mandatory. It specifies the URL of the image.

Note: When a webpage is loaded, the browser retrieves the image from the web server and inserts it into the page. Therefore, ensure that the image is at the same point as the related webpage, otherwise, visitors might get a broken link icon. If the browser cannot find the image, it will display a broken link icon.


Differences Between HTML 4.01 and HTML5

None.


Syntax

Attribute Values

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")<br> Relative URL - points to a file within the website (e.g., src="image.gif")
❮ Tag Sup Att Table Cellpadding ❯