HTML <embed> Tag: The HTML embed tag specifies a container for an external application or interactive content. It is used as a container for embedding plug-ins such as flash animations. This tag is a new tag in HTML 5 and it requires only starting tag.
HTML <embed> Tag
This HTML<embed> tag supports both the global and the event attributes.
Syntax: <embed>
Attributes
The <embed> tag contains four attributes which are discussed below:
- height: This attribute contains the attribute value in pixel. It is used to specify the height of the embedded content.
- src: It is used to hold the URL. It is used to specify the web address of the embedded content.
- width: The width value is set in pixels. It is used to specify the width of the embedded content.
- type: It contains the media_type content. It is used to specify the media type of the embedded content.
Browser compatibility
The HTML<embed> tag is supported by different types of browsers.
- Chrome
- Firefox
- Opera
- Safari
- Internet Explorer
Example:
<!DOCTYPE html> <html> <body> <embed src="logo.swf"> </body> </html>
Output:
Attributes that are supported by the <embed> tag
Attribute | Value | Description |
---|---|---|
height | pixels | Specifies the height of the embedded content |
src | URL | Describes the address of the external file to embed |
type | media_type | Specifies the media type of the embedded content |
width | pixels | Specifies the width of the embedded content |