Widely available Use only when the embedded format truly requires it. Prefer better-supported alternatives such as <img>, <video>, <audio>, <iframe>, or native HTML content when possible.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
1
12
1
≤4
18
≤3.2
HTML attribute
height
1
12
1
≤4
18
≤3.2
src
1
12
1
≤4
18
≤3.2
type
1
79
1
≤4
18
≤3.2
width
1
12
1
≤4
18
≤3.2
DOM API

The HTMLEmbedElement interface provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating embed elements.

1
12
1
3
18
1

The getSVGDocument() method of the HTMLEmbedElement interface returns the Document object of the embedded SVG.

1
12
1.5
3
18
1

The height property of the HTMLEmbedElement interface returns a string that reflects the height attribute of the embed element, indicating the displayed height of the resource in CSS pixels.

1
12
1
3
18
1

The src property of the HTMLEmbedElement interface returns a string that indicates the URL of the resource being embedded.

1
12
1
3
18
1

The type property of the HTMLEmbedElement interface returns a string that reflects the type attribute of the embed element, indicating the MIME type of the resource. It reflects the embed element's type attribute

1
79
1
3
18
1

The width property of the HTMLEmbedElement interface returns a string that reflects the width attribute of the embed element, indicating the displayed width of the resource in CSS pixels.

1
12
1
3
18
1
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Notes 1 item(s)
Implementation note
  • Starting with Chrome 58, this interface can no longer be called as a function.
Notes 1 item(s)
Implementation note
  • Starting with Chrome Android 58, this interface can no longer be called as a function.

Syntax

HTML
<embed src="document.pdf" type="application/pdf"
  width="600" height="400">

Use cases

  • Specialized document viewers

    Embed a format that has no better native element and still needs inline presentation.

  • Legacy integrations

    Maintain older embedded content while planning a migration toward more standard markup.

Cautions

  • Embedded external content can behave inconsistently across devices and may offer poor integration with the surrounding page.
  • Do not reach for embed when a more semantic or better-supported element already exists.

Accessibility

  • Always provide fallback access to the same resource because embedded viewers may not expose usable semantics.
  • If the embedded content is essential, confirm that keyboard access and reading support are available in practice.