Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 934075 of <embed>

  • Revision slug: Web/HTML/Element/embed
  • Revision title: <embed>
  • Revision id: 934075
  • Created:
  • Creator: Sebastianz
  • Is current revision? Yes
  • Comment Replaced list for properties by table (bug 1212755) and removed translated tags

Revision Content

Summary

The HTML <embed> Element represents an integration point for an external application or interactive content (in other words, a plug-in).

{{Note("This topic documents only the element that is defined as part of HTML5. It does not address earlier, non-standardized implementation of the element.")}}

Content categories Flow content, phrasing content, embedded content, interactive content, palpable content.
Permitted content None, it is an {{Glossary("empty element")}}.
Tag omission Must have a start tag, and must not have an end tag.
Permitted parent elements Any element that accepts embedded content.
DOM interface {{domxref("HTMLEmbedElement")}}

Attributes

This element includes the global attributes.

{{htmlattrdef("height")}}
The displayed height of the resource, in CSS pixels.
{{htmlattrdef("src")}}
The URL of the resource being embedded.
{{htmlattrdef("type")}}
The MIME type to use to select the plug-in to instantiate.
{{htmlattrdef("width")}}
The displayed width of the resource, in CSS pixels.

Examples

<embed type="video/quicktime" src="movie.mov" width="640" height="480">

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', 'the-iframe-element.html#the-embed-element', '<embed>')}} {{Spec2('HTML WHATWG')}}  
{{SpecName('HTML5 W3C', 'embedded-content-0.html#the-embed-element', '<embed>')}} {{Spec2('HTML5 W3C')}}  

Browser compatibility

Note: There is currently an implementation difference in between browsers. While Blink (Chrome, Opera) will display the content of HTML resource, Firefox displays a generic message saying the content needs a plug-in (see {{Bug("730768")}}). It is recommended to use the <object> or <iframe> element.

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatVersionUnknown}} {{CompatGeckoDesktop("1.0")}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}

See also

  • Other elements that are used for embedding content of various types include {{HTMLElement("audio")}}, {{HTMLElement("canvas")}}, {{HTMLElement("iframe")}}, {{HTMLElement("img")}}, {{MathMLElement("math")}}, {{HTMLElement("object")}}, {{SVGElement("svg")}}, and {{HTMLElement("video")}}.

{{ HTMLRef }}

Revision Source

<h2 id="Summary">Summary</h2>

<p>The <strong>HTML <code>&lt;embed&gt;</code> Element</strong> represents an integration point for an external application or interactive content (in other words, a plug-in).</p>

<p>{{Note("This topic documents only the element that is defined as part of HTML5. It does not address earlier, non-standardized implementation of the element.")}}</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row"><a href="/en-US/docs/HTML/Content_categories" title="HTML/Content_categories">Content categories</a></th>
   <td><a href="/en-US/docs/HTML/Content_categories#Flow_content" title="HTML/Content categories#Flow content">Flow content</a>, <a href="/en-US/docs/HTML/Content_categories#Phrasing_content" title="HTML/Content categories#Phrasing content">phrasing content</a>, embedded content, interactive content, palpable content.</td>
  </tr>
  <tr>
   <th scope="row">Permitted content</th>
   <td>None, it is an {{Glossary("empty element")}}.</td>
  </tr>
  <tr>
   <th scope="row">Tag omission</th>
   <td>Must have a start tag, and must not have an end tag.</td>
  </tr>
  <tr>
   <th scope="row">Permitted parent elements</th>
   <td>Any element that accepts embedded content.</td>
  </tr>
  <tr>
   <th scope="row">DOM interface</th>
   <td>{{domxref("HTMLEmbedElement")}}</td>
  </tr>
 </tbody>
</table>

<h2 id="Attributes">Attributes</h2>

<p><span style="line-height:21px">This element includes the&nbsp;</span><a href="https://developer.mozilla.org/en-US/docs/HTML/Global_attributes" style="line-height: 21px;" title="HTML/Global attributes">global attributes</a><span style="line-height:21px">.</span></p>

<dl>
 <dt>{{htmlattrdef("height")}}</dt>
 <dd>The displayed height of the resource, in CSS pixels.</dd>
 <dt>{{htmlattrdef("src")}}</dt>
 <dd>The URL&nbsp;of the resource being embedded.</dd>
 <dt>{{htmlattrdef("type")}}</dt>
 <dd>The MIME&nbsp;type to use to select the plug-in to instantiate.</dd>
 <dt>{{htmlattrdef("width")}}</dt>
 <dd>The displayed width of the resource, in CSS pixels.</dd>
</dl>

<h2 id="Examples">Examples</h2>

<pre class="brush: html">
&lt;embed type="video/quicktime" src="movie.mov" width="640" height="480"&gt;
</pre>

<h2 id="Specifications" name="Specifications">Specifications</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', 'the-iframe-element.html#the-embed-element', '&lt;embed&gt;')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'embedded-content-0.html#the-embed-element', '&lt;embed&gt;')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td>&nbsp;</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<div class="note">
<p><strong>Note</strong>: There is currently an implementation difference in between browsers. While Blink (Chrome, Opera) will display the content of HTML resource, Firefox displays a generic message saying the content needs a plug-in (see {{Bug("730768")}}). It is recommended to use the &lt;object&gt; or &lt;iframe&gt; element.</p>
</div>

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatGeckoDesktop("1.0")}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="See_also">See also</h2>

<ul>
 <li>Other elements that are used for embedding content of various types include {{HTMLElement("audio")}}, {{HTMLElement("canvas")}}, {{HTMLElement("iframe")}}, {{HTMLElement("img")}}, {{MathMLElement("math")}}, {{HTMLElement("object")}}, {{SVGElement("svg")}}, and {{HTMLElement("video")}}.</li>
</ul>

<p>{{ HTMLRef }}</p>
Revert to this revision