Embed HTML

HTML <embed> Tag

To embed an external document in an HTML file, the HTML <embed> tag is used. The external document can be a third-party application, multimedia, plugin, etc. It was introduced in HTML5. Other than the HTML <embed> tg the HTML <audio> and <video> tags are also used to embed multimedia in HTML documents.

Syntax:

<embed src=" " ></embed>

Example:

<!DOCTYPE html>
<html>
<body>
<h2>Example:</h2>
<embed src="img.jpg" height="200" width="300">
</body>
</html>

Explanation:

In the above example, we are using the HTML <embed> tag to include a JPG file in an HTML document.

Tag Specific Attributes:

Attribute Value Uses
height pixels Used to define the height of the embedded content.
src URL Used to define the address of the external file to embed.
type media_type Used to define the media type of the embedded content.
width pixels Used to define the width of the embedded content.

Global Attributes:

The Global attributes are supported by the HTML <embed> tag.

Event Attributes:

The Event attributes are supported by the HTML <embed> tag.

Supporting Browsers:

Chrome, IE, Firefox, Opera, and Safari.