This website uses cookies

We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you've provided to them or that they've collected from your use of their services. Please read more at our privacy policy page.



HTML <embed> Tag

The <embed> tag is used as a container for external applications, multimedia and interactive content that the browser doesn’t understand. You need to connect external plug-ins or special programs for their correct display. The display of the embedded content depends on the file type, the attributes of the <embed> tag, and the plugins installed in the browser.

Although supported by the browsers, the <embed> tag wasn’t part of the HTML4 standard. To load objects into HTML4, use the <object> tag. But since not all browsers correctly display the information it contains, we use the <embed> tag inside the <object> container to provide support of more browsers, as well as the validity of the document. Since the <embed> tag has gained official status in the new version of HTML, there are no problems with the validation of the document in HTML5.

Syntax

The <embed> tag is an empty element, which means that the closing tag isn’t required.

Example

<!DOCTYPE>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <embed src="/uploads/media/default/0001/01/0710cad7a1017902166203def268a0df2a5fd545.png" />
  </body>
</html>

Result

In this example, we placed our logo using the <embed> tag.

Attributes

Attribute Value Description
align Specifies the alignment of the embedded content on the page and the way it is wrapped around the text.
left Aligns to the left.
right Aligns to the right.
center Aligns the center.
justify Aligns to the right and left edges.
height pixels Defines the height of the embedded content.
pluginspage URL Address, from where we can download and install necessary plug-in.
src URL Indicates the path to the file which will be inserted in the <embed> tag.
type MIME-type Defines the MIME type (specification for the transmission over the network of files of various types) of the embedded content.
vspace pixels Defines the vertical indent from the embedded content to the surrounding one.
width pixels Defines the width of the embedded content.

The <embed> tag supports the Global attributes and the Event Attributes.

Browser support