1. Technology

<embed />


<embed /> Description:

The <embed /> tag inserts a non-standard object or external content (typically non-HTML) into the document.

The embed tag was deprecated in HTML 4 in favor of the object tag, but then was added back into the HTML5 specification.

The embed tag is not part of the HTML 4 specification, but many web browsers support it to allow you to embed multimedia content including media types that might not otherwise be supported by the browser. It is one of the most reliable ways to embed video. But if you use it in an HTML 4 page, your HTML will not validate.

<embed /> Web Browser Support:

HTML Versions

<embed /> Attributes:

Global attributes, event attributes and:

  • align - not part of HTML5 - recommend using CSS instead
  • alt - not part of HTML5
  • border - not part of HTML5 - recommend using CSS instead
  • code - not part of HTML5
  • codebase - not part of HTML5
  • height
  • hidden - not part of HTML5
  • hspace - not part of HTML5
  • name - not part of HTML5 - recommend using id attribute instead
  • pallette - not part of HTML5
  • pluginspage - not part of HTML5
  • pluginurl - not part of HTML5
  • src
  • type
  • units - not part of HTML5
  • vspace - not part of HTML5 - recommend using CSS instead
  • volume - not part of HTML5
  • width

<embed /> End Tag:

None - the embed tag is a singleton tag.

<embed /> Contents:


<embed /> Valid Context:

The <embed /> tag is valid within the following tags:
a, abbr, acronym, address, applet, b, bdo, big, blockquote, body, button, caption, center, cite, code, dd, del, dfn, div, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, i, iframe, ins, kbd, label, legend, li, noframes, noscript, object, p, pre, q, s, samp, small, span, strike, strong, sub, sup, td, th, tt, u, var

<embed /> Usage:

embed a movie in a document

<embed src="html.mov" width="50" height="100" />
<noembed>Web Movie</noembed>

<embed /> Special Notes:

  • This tag is not part of the HTML 4.0 specification. If you must have valid HTML 4, you should use the object tag.
  • HTML5 re-introduced this tag to the specification.
  • In HTML 4, be sure to enclose descriptive text, HTML, or other information within the noembed tag to keep it accessible for older browsers and screen readers.
  • The noembed tag is not part of HTML5. Instead, to keep your pages accessible, you should use the alt attribute, even though it's not included in HTML5.

More <embed /> Information:

  1. About.com
  2. Technology
  3. Web Design / HTML
  4. HTML and XHTML
  5. XHTML
  6. HTML Tags
  7. The Embed Tag - Deprecated in XHTML 1.0 HTML 4.0

©2014 About.com. All rights reserved.