DEV Community

Share Point Anchor
Share Point Anchor

Posted on • Originally published at sharepointanchor.com on

HTML <embed> Embed Tag

In HTML, the Embed tag is used to insert external applications , multimedia, or any other interactive content on the web page. It acts as a container for adding external resources. The external resource can be an application , a browser plug-in , or a video.

⚠ Note : The tag is deprecated in HTML and not part of the HTML 4 standard. But it is one of the HTML 5 elements.

Estimated reading time: 3 minutes

Syntax:

The tag does not require a closing tag in HTML. But in XHTML , it contains both opening tag and closing tag.


<embed attribute="value">

Enter fullscreen mode Exit fullscreen mode

HTML Tag Characteristics:

th, td{ padding: 20px; }

| HTML tag | Embeds external content into the document. |
| Content categories | Flow content, phrasing content, embedded content, interactive content, palpable content. |
| Permitted content | None, it is an empty element. |
| Tag omission | It must have a start tag, but no need to have an end tag. |
| Permitted parents | Any element that accepts embedded content. |
| Implicit ARIA role | No corresponding role |
| Permitted ARIA roles | application, document, img, none, presentation. |
| DOM interface | HTMLEmbedElement |

Sample of the HTML Tag:


<!DOCTYPE>
<html>
  <head>
    <title>HTML <embed> Tag</title>
  </head>
  <body>
<h2>Example of the HTML <embed> tag</h2>
<h4>Share Point Anchor Logo</h4>
    <embed src="https://sharepointanchor.com/wp-content/uploads/2021/01/SPA-LOGO.png">
  </body>
</html>

Enter fullscreen mode Exit fullscreen mode

Result:

Result
Result

Download Sample File:

HTML-embed-tagDownload

Example of the HTML Tag to insert audio:


<!DOCTYPE>
<html>
  <head>
    <title>HTML <embed> Tag</title>
  </head>
  <body>
<h2>Example of the HTML <embed> tag for placing audio:</h2>
    <embed type="audio/mpeg" src="https://sharepointanchor.com/wp-content/uploads/2021/02/SPA.mp3">
  </body>
</html>

Enter fullscreen mode Exit fullscreen mode

Result:

Result

Example of the HTML Tag to insert a Video:


<!DOCTYPE>
<html>
  <head>
    <title>HTML <embed> Tag</title>
  </head>
  <body>
<h2>Example of the HTML <embed> tag for placing a video:</h2>
    <embed type="video/ogg" src="https://sharepointanchor.com/wp-content/uploads/2021/02/final_602f76d11bb12f0036c1839a_923567.mp4?" width="300" height="200">
  </body>
</html>

Enter fullscreen mode Exit fullscreen mode

Result:

Result

Attributes:

The HTML Embed Tag supports both the Global attributes and the Event Attributes.

th, td{ padding: 20px; }

Attribute Value Description
align The align attribute specifies the alignment of the embedded content on the page and the way it is wrapped around the text.
left It helps to align the left.
right It is used to align the right side.
center This value specifies the center alignment.
justify Aligns to the right and left edges.
height pixels It defines the height of the embedded content.
pluginspage URL Address , where we can download and install a necessary plug-in.
src URL It will indicate the path to the file which will be inserted in the 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 It specifies the vertical indent from the embedded content to the surrounding one.
width pixels This value used to specify the width of the embedded content.

Browser Support:

Browser Support

Related Articles:

The post HTML Embed Tag appeared first on Share Point Anchor.

Top comments (0)