HTML <embed> Tag

❮ Previous Reference Next ❯

Example

<h1>embed video</h1>
<embed type="video/mp4" src="video.mp4" width="300" height="150">

<h1>embed image</h1>
<embed type="image/jpeg" src="img-boy.jpg" width="300" height="150">

Meaning

The <embed> element specifies an object, typically a multimedia element, to be embedded in an HTML document.

Web pages, pictures, videos, other media files can be embed in a document

Notes:

Most modern browsers have deprecated and removed support for browser plug-ins, so relying upon <embed> is generally not wise if you want your site to be operable on the average user's browser.

Version: HTML5


Standard Syntax

<embed type="mediaType" src="URL" width="pixels" height="pixels">



Browser Support




Status







Attributes

Attribute Value Description
height pixels Specifies the height of the embedded object.
src URL Specifies the URL of source content for the embedded object.
type mediaType Specifies the MIME type of the embedded object.
width pixels Specifies the width of the embedded object.



Global Attributes

<embed> element also supports the Global Attributes in HTML.


Event Attributes

<embed> element also supports the Event Attributes in HTML.


By Default CSS Value(s)

Most of the browsers will display the <embed> element with the following by default value(s)

embed:focus {
  outline: none;
}

You can use the object-position property to adjust the positioning of the embedded object within the element's frame, and the object-fit property to control how the object's size is adjusted to fit within the frame.




Related Tags:

<audio>, <iframe>, <img>, <map>, <object>, <param>, <picture>, portal>, <source>, <track> and <video>
❮ Previous Reference Next ❯