HTML <embed> Tag
- Previous Page <em>
- Next Page <fieldset>
Definition and Usage
<embed>
The tag defines a container for external resources, such as web pages, images, media players, or plugin applications.
Warning
Most browsers no longer support Java applets and plugins.
No browser supports ActiveX controls anymore.
Modern browsers have also stopped supporting Shockwave Flash.
Suggestion
To display an image, it is best to use <img> tag.
To display HTML, it is best to use <iframe> tag.
To display video or audio, it is best to use <video> and <audio> Tag.
See also:
HTML DOM Reference Manual:Embed Object
Instance
Example 1
Embedded image:
<embed type="image/jpg" src="tulip.jpg" width="150" height="150">
Example 2
Embedded HTML page:
<embed type="text/html" src="/index.html" width="500" height="200">
Example 3
Embedded video:
<embed type="video/webm" src="shanghai.mp4" width="641" height="360">
Attribute
Attribute | Value | Description |
---|---|---|
height | Pixel Value | Specifies the height of the embedded content. |
src | URL | Specifies the address of the external file to be embedded. |
type | Media Type | Specifies the media type of the embedded content. |
width | Pixel Value | Specifies the width of the embedded content. |
Global Attributes
<embed>
The tag also supports Global Attributes in HTML.
event attributes
<embed>
The tag also supports Event Attributes in HTML.
Default CSS Settings
Most browsers will display the following default values <embed>
Element:
embed:focus { outline: none; }
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
- Previous Page <em>
- Next Page <fieldset>