html tutorial - <embed> Tag in HTML - html5 - html code - html form



embed tag

Learn html - html tutorial - embed tag - html examples - html programs

  • The <embed> element is used to describe a container for an external application or interactive content.
  • The <embed> tag support the Global Attribute and Event Attribute.
  • In the content categories are flow content, phrasing content, embedded content, interactive and palpable content.

Syntax for <embed> tag:

<embed src =”URL”>

Differences between HTML 4.01 and HTML 5 for <embed> tag in HTML:

HTML 4.0.1

  • HTML 4 does not support <embed> tag.

HTML 5

  • HTML 5 support <embed> tag.

Sample Coding for <embed> tag:

Tryit<!DOCTYPE html>
<html>
    <head>
        <title>Wikitechy embed tag</title>
    </head>
    <body>
        <h2>HTML embed tag with example.</h2>
        <embed src="https://www.youtube.com/embed/8iFmjh_YWxQ">
        </embed>
    </body>
</html>

Code Explanation for <embed> tag:

<embed> Tag Code Explanation

  1. The <embed> tag is used to container for the YouTube video.
  2. src attribute used to define the source URL for the embedded content.

Output for <embed> tag:

<embed> Tag Output

  1. The output shows the YouTube video embedded to the document.

Attributes of <embed> tag:

Attribute Value HTML4 HTML5 Description
src URL No Yes It specifies the address of the external file to embed.
width pixels No Yes It specifies the width of the embedded content.
type media_type No Yes It specifies the media type of the embedded content.
height pixels No Yes It specifies the height of the embedded content.

Browser Support for <embed> tag in HTML:

Yes Yes Yes Yes Yes

Related Searches to <embed> tag in html