View video tutorial

HTML Embed

HTML

The <embed> tag acts as a container for external resources such as a picture, a media player, or a plug-in application.

HTML <embed> Tag.


➔ HTML <embed> is a container for external resources.

➔ The best use and the objective of <embed> element is to add browsers plug-ins.

➔ HTML has all media control elements to deal with each media types. <iframe>, <img>, <video> etc. So recommendation is to use these elements as a first priority.

➔ The embed tag is a self-closing tag and does not require a separate closing tag

Recommended alternatives are:

  • Use the <img> tag for images.
  • Use the <audio> tag for audio.
  • Use the <video> tag for video.
  • Use the <iframe> tag for embedding content.

HTML embed tag example

The HTML embed tag is used as a container to integrate external content such as audio, video, images, pdf files etc.

Note: Click play button to play the video.

Learning with HTML Editor "Try it Now"

You can edit the HTML code and view the result using online editor.

Example

    <h3>Document in embed</h3>
    <div>
        <embed type="text/html" src="./index.jsp" width="500" height="200"/>
    </div>
    <h3>Media in embed</h3>
    <div>
        <embed type="text/html" src="resources/media/seaside.mp4" width="500" height="200"/>
    </div>
Try it Now »

Click on the "Try it Now" button to see how it works.