|
HTML <img> src attribute
HTML <img> tag
Example
An image is marked up as follows:
| <img src="angry.gif" alt="Angry face" /> |
|
Definition and Usage
The required src attribute specifies the URL of an image.
Browser Support

The src attribute is supported in all major browsers.
Syntax
Attribute Values
| Value |
Description |
| URL |
The URL of the image. Possible values:
- An absolute URL - points to another web site (like src="http://www.example.com/image.gif")
- A relative URL - points to a file within a web site (like src="image.gif")
|
HTML <img> tag
 |
W3Schools' Online Certification Program
The perfect solution for professionals who need to balance work, family, and career building.
More than 3500 certificates already issued!
|
The HTML Certificate documents your knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
|