HTML <embed> Tag
- Previous Page <em>
- Next Page <fieldset>
Definitie en gebruik
<embed>
De tag definieert een container voor externe bronnen, zoals webpagina's, afbeeldingen, mediaspelers of plugin-applicaties.
Waarschuwing
De meeste browsers ondersteunen geen Java-applets en plugins meer.
Geen browser ondersteunt meer ActiveX-controls.
Moderne browsers hebben de ondersteuning voor Shockwave Flash reeds beëindigd.
Aanbeveling
Om een afbeelding te weergeven, is het beter om te gebruiken <img>-tag.
Om HTML te weergeven, is het beter om te gebruiken <iframe>-tag.
Om video of audio te weergeven, is het beter om te gebruiken <video> en <audio> Tag.
Zie ook:
HTML DOM Referentiemanual:Embed-object
Voorbeeld
Voorbeeld 1
Ingebedde afbeelding:
<embed type="image/jpg" src="tulip.jpg" width="150" height="150">
Voorbeeld 2
Ingebedde HTML-pagina:
<embed type="text/html" src="/index.html" width="500" height="200">
Voorbeeld 3
Ingebedde 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>