Published Jul 1, 2022
Contribute to Docs

The <embed> element renders an element that wraps around interactive content, including images, videos, and even other web pages. This is achieved with tools such as browser plug-ins. However, since most modern browsers no longer support plug-ins, there are other tags to use instead of <embed>. This includes:

  • Playing video content with the <video> element.
  • Displaying images with the <img> element.
  • Rendering additional markup with the <iframe> element.

Since those tags are available, using the <embed> element is discouraged.


<embed type="" src="" width="" height="" />

The <embed>element is self-closing and accepts at least four properties:

  • The type of content to be embedded (e.g. “image/jpg”).
  • The src of the content.
  • The content’s height, measured in pixels.
  • The content’s width, measured in pixels.


The following example showcases the <embed> element:

<!DOCTYPE html>
<title>Learning about HTML</title>
<embed type="image/jpg" src="my_image.jpg" width="300" height="200" />

All contributors

Looking to contribute?

Learn HTML on Codecademy