src (HTML attribute)

Spec
Depr. Version
No N/A

Syntax

src="URL of data"

Example

The src attribute for this object refers to a .jpg file:

<embed src="giant-grasshopper.jpg" height="206" width="300"></embed>

Description

The src attribute tells the browser where it can find the necessary data/file for the embedded object, much like the src attribute does for the img element.

Value

The location of the data - image, video, audio etc - relative to the referencing document, relative to the server root or as a complete URI containing the http:// protocol, the server name and the path to the document on that server.

Compatibility

It causes no compatibility issues, and has excellent support across all tested browsers.

User-contributed notes

There are no comments yet.

Related Products