embed
Spread the love

HTML <embed> Tag

See how to use <embed> Tag in this blog. You can add image, video, gif file, audio, web page and extras using embed tags and display them in the output.

HTML <embed> Tag is employed to imbed AN external document in AN hypertext mark-up language file which may be a 3rd party application, multimedia, plugin(interactive content), etc. This part is new in HTML5.

Note:- The <embed> element can be used to include third party applications as well as multimedia documents, but the newly added <audio> and <video> elements in HTML5 are typically used to embed multimedia in an HTML document.

How to add GIF file in embed Tag?

Example:-

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>HTML embed Tag</title>
</head>
<body>
<h1>Example of HTML Embed tag</h1>
<embed src="https://www.myprograming.com/wp-content/uploads/2021/09/girl-dance.gif" width="200px"></embed>
</body>
</html>

Output:-

How to add image in embed Tag?

Example:-

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>HTML embed Tag</title>
</head>
<body>
<h1>Example of HTML Embed tag</h1>
<embed  type="image/png" src="https://www.myprograming.com/wp-content/uploads/2021/06/myprograming-logo.png" width="200px"></embed>
</body>
</html>

Output:-

How to add Video in embed Tag?

Example:-

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>HTML embed Tag</title>
</head>
<body>
<h1>Example of HTML Embed tag</h1>
<embed  type="video/webm" src="https://www.myprograming.com/wp-content/uploads/2021/09/animals.mp4" width="200px"></embed>
</body>
</html>

Output:-

How to add Audio in embed Tag?

Example:-

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>HTML embed Tag</title>
</head>
<body>
<h1>Example of HTML Embed tag</h1>
<embed  type="audio/mp3" src="https://www.myprograming.com/wp-content/uploads/2021/09/Nand-Gher-Anand-Bhayo.mp3" ></embed>
</body>
</html>

Output:-

How to add Web Page in embed Tag?

Example:-

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>HTML embed Tag</title>
</head>

<body>
<h1>Example of HTML Embed tag</h1>
<embed  type="" src="https://www.myprograming.com/" width="100%" height="500px" style="border: 1px solid;"></embed>
</body>
</html>

Output:-

Attribute

height

src

type

width


Spread the love

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *