HTML | <embed> Tag

The <embed> tag in HTML is used for embedding external application which is generally multimedia content like audio or video into an HTML document. It is used as a container for embedding plug-ins such as flash animations. This tag is a new tag in HTML 5 and it requires only starting tag.

Syntax:

<embed attributes>

Attributes: The <embed> tag contains four attributes which are discussed below:

  • height: This attribute contains the attribute value in pixel. It is used to specify the height of the embedded content.
  • src: It is used to hold the URL. It is used to specify the web address of the embedded content.
  • width: The width value are set in pixels. It is used to specify the width of embedded content.
  • type: It contains the media_type content. It is used to specify the media type of the embedded content.

Below programs illustrates the <embed> element in HTML:

Example 1:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
    <head>
        <title>embed Tag</title>
        <style>
            q {
                color: #00cc00;
                font-style: italic;
            }
        </style
    </head>
    <body>
        <q>GeeksforGeeks</q> is loading.
        <br>
        <embed src="loading2.swf" 
        type="application/x-shockwave-flash">
    </body>
</html>                    

chevron_right


Output:

Example 2: This example uses the width and height property with the <embed> tag.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
    <head>
        <title>embed Tag</title>
        <style>
            q {
                color: #00cc00;
                font-style: italic;
            }
        </style
    </head>
    <body>
        Click here to redirect to <q>GeeksforGeeks</q>
        <br>
        <embed src="animProps02.swf" width="30px" height="30px">
        <a href="http://geeksforgeeks.org">GeeksforGeeks</a>
    </body>
</html>                              

chevron_right


Output:

Supported Browsers: The browser supported by <embed> tag are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari


My Personal Notes arrow_drop_up

I am a technology enthusiast who has a keen interest in programming I am pursuing Engineering in Computer Science from GEU, Dehradun I like to unwind by watching movies and English sitcomsI have a keen interest in music

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.