Embed src attribute
Definition and usage
src
Sets or returns the value of the src attribute in the embed element.
embed src attribute Specifies the address (URL) of the external file to be embedded.
See also:
HTML Reference Manual:HTML <embed> Tag
Example
Returns the URL of the embedded file:
var x = document.getElementById("myEmbed").src;
Syntax
Return the src attribute:
embedObject.src
Set the src attribute:
embedObject.src = URL
Attribute value
Value | Description |
---|---|
URL |
Specifies the address (URL) of the external file to be embedded. Possible values:
|
Technical Details
Return Value: | A string value representing the URL of the embedded file. Returns the entire URL, including the protocol (such as http://). |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
Related Pages
HTML Reference Manual:HTML <embed> src Attribute