1. About.com
  2. Computing & Technology
  3. Web Design / HTML

Discuss in my forum

<embed />

By , About.com Guide

<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 HTML 5 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 HTML 5 - recommend using CSS instead
  • alt - not part of HTML 5
  • border - not part of HTML 5 - recommend using CSS instead
  • code - not part of HTML 5
  • codebase - not part of HTML 5
  • height
  • hidden - not part of HTML 5
  • hspace - not part of HTML 5
  • name - not part of HTML 5 - recommend using id attribute instead
  • pallette - not part of HTML 5
  • pluginspage - not part of HTML 5
  • pluginurl - not part of HTML 5
  • src
  • type
  • units - not part of HTML 5
  • vspace - not part of HTML 5 - recommend using CSS instead
  • volume - not part of HTML 5
  • width
<embed /> End Tag:
None - the embed tag is a singleton tag.
<embed /> Contents:

Nothing.

<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.
  • HTML 5 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 HTML 5. Instead, to keep your pages accessible, you should use the alt attribute, even though it's not included in HTML 5.
More <embed /> Information:

©2012 About.com. All rights reserved. 

A part of The New York Times Company.