CodesJava

Easy learning with example program codes

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 document.

Syntax:

<embed src=" " ></embed>

Example:

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

Output:

Explanation:

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

Tag Specific Attributes:

AttributeValueUses
heightpixelsUsed to define the height of the embedded content.
srcURLUsed to define the address of the external file to embed.
typemedia_typeUsed to define the the media type of the embedded content.
widthpixelsUsed 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.

Please follow and like us:
error
Posted in HTML   









Copyright © 2019 CodesJava DMCA.com Protection Status