View video tutorial

HTML <embed> Tag

HTML

The <embed> element contains External Content.

HTML <embed> Tag


The <embed> tag provides a container for an external resource

It is recommended to use the alternative tags where specific elements are available.

To embed a image, use the <img> tag or <picture> tag.

To embed a audio, use the <audio> tag.

To embed a video, use the <video> tag.

To embed a HTML, use the <iframe> tag

To embed a Object, use the <object> tag.

Element Attributes

Attribute Value Description
height pixels This specifies the displayed height of the resource.
src url This specifies the URL of the embedded resource.
type media_type Specifies the MIME type to use to.
width pixels Specifies the displayed width of the resource.

Global attributes

Global attributes may be applied on all elements, although some elements may have no effect on them.

<accesskey>, <class>, <contenteditable>, <contextmenu>, <data-*>, <dir>, <draggable>, <dropzone>, <hidden>, <id>, <lang>, <spellcheck>, <style>, <tabindex>, <title>, <translate>.

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"></embed>
  </div>
  <h3>Media in embed</h3>
  <div>
    <embed type="text/html" src="https://www.youtube.com/embed/RL4CyCvt6aw" width="500" height="200"></embed>
  </div>
Try it Now »

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