The <embed>
element is used to define a container for an object from an external source. This allows users to embed webpages, videos, audio, and images into their web pages. To include the tag in your webpage, you only need the opening tag (<embed>
).
Different tags specific to the type to their type of media content can be used instead of the <embed>
tag as well. Some of these are:
Tag | Object referenced |
<img> | This tag is used to display a picture |
<video> | This tag is used to embed a video |
<audio> | This tag is used to embed an audio file |
<iframe> | This tag is used to display an HTML page |
The <embed>
tag supports
CSS styling can be used to modify the appearance of the embedded object. Properties like height
, width
, etc. can be used.
The following code example shows how an image can be embedded into a webpage.