HTML/Elements/embed

From Web Education Community Group
< HTML‎ | Elements
Jump to: navigation, search

<embed>

The <embed> element represents an integration point for an external (typically non-HTML) application or interactive content.

Accessibility

Authors should ensure that the information and user interface components must be presentable to users in ways they can perceive (WCAG 2.0 - Principle 1: Perceivable). This includes providing alternatives for time-based media Guideline 1.2.


HTML Attributes

  • src = URL potentially surrounded by spaces
    gives the address of the resource being embedded.


  • type = MIME type
    Specifies the type of the resource.


  • width = non-negative integer
    Give the width of the visual content of the element, in CSS pixels.


  • height = non-negative integer
    Give the height of the visual content of the element, in CSS pixels.


Example

Example A

Here's a way to embed a resource that requires a proprietary plug-in, like Flash.
To pass the plugin a parameter "quality" with the value "high", an attribute can be specified: [try it]:

<embed src="catgame.swf" quality="high">

This would be equivalent to the following, when using an object element instead:

<object data="catgame.swf">
  <param name="quality" value="high">
</object>


HTML Reference

The HTML5 specification defines the <embed> element in 4.8.3 The embed element.