HTML <embed>
Tag Tutorial
The <embed>
tag is used to embed different types of media content, such as audio, video, interactive content, and plugins, directly into an HTML document.
Usage
The <embed>
tag replaces older technologies like <object>
and <applet>
for embedding media content.
Here is an example of how to use the <embed>
tag to embed a video:
<embed src="video.mp4" width="640" height="360">
Main Tag Attributes
Attribute | Description |
---|---|
src |
Specifies the URL of the resource to be embedded. |
width |
Specifies the width of the embedded content. |
height |
Specifies the height of the embedded content. |
type |
Specifies the media type of the embedded content. |
autoplay |
Specifies whether the content should automatically start playing when loaded. |
loop |
Specifies whether the content should loop when it reaches the end. |
controls |
Specifies whether the browser should provide controls for the embedded content. |
These are just a few of the attributes that can be used with the <embed>
tag. For a full list of attributes and more information, refer to the W3Schools documentation.