
- HTML Home
- HTML Roadmap
- HTML Introduction
- HTML History & Evolution
- HTML Editors
- HTML Basic Tags
- HTML Elements
- HTML Attributes
- HTML Headings
- HTML Paragraphs
- HTML Fonts
- HTML Blocks
- HTML Style Sheet
- HTML Formatting
- HTML Quotations
- HTML - Comments
- HTML - Colors
- HTML - Images
- HTML - Image Map
- HTML - Frames
- HTML - Iframes
- HTML - Phrase Elements
- HTML - Code Elements
- HTML - Meta Tags
- HTML - Classes
- HTML - IDs
- HTML - Backgrounds
- HTML Tables
- HTML - Tables
- HTML - Table Headers & Captions
- HTML - Table Styling
- HTML - Table Colgroup
- HTML - Nested Tables
- HTML Lists
- HTML - Lists
- HTML - Unordered Lists
- HTML - Ordered Lists
- HTML - Definition Lists
- HTML Links
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML Color Names & Values
- HTML - Color Names
- HTML - RGB & RGBA Colors
- HTML - HEX Colors
- HTML - HSL & HSLA Colors
- HTML - HSL Color Picker
- HTML Forms
- HTML - Forms
- HTML - Form Attributes
- HTML - Form Control
- HTML - Input Attributes
- HTML Media
- HTML - Video Element
- HTML - Audio Element
- HTML - Embed Multimedia
- HTML Header
- HTML - Head Element
- HTML - Adding Favicon
- HTML - Javascript
- HTML Layouts
- HTML - Layouts
- HTML - Layout Elements
- HTML - Layout using CSS
- HTML - Responsiveness
- HTML - Symbols
- HTML - Emojis
- HTML - Style Guide
- HTML Graphics
- HTML - SVG
- HTML - Canvas
- HTML APIs
- HTML - Geolocation API
- HTML - Drag & Drop API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web Storage
- HTML - Server Sent Events
- HTML Miscellaneous
- HTML - Document Object Model (DOM)
- HTML - MathML
- HTML - Microdata
- HTML - IndexedDB
- HTML - Web Messaging
- HTML - Web CORS
- HTML - Web RTC
- HTML Demo
- HTML - Audio Player
- HTML - Video Player
- HTML - Web slide Desk
- HTML Tools
- HTML - Velocity Draw
- HTML - QR Code
- HTML - Modernizer
- HTML - Validation
- HTML - Color Picker
- HTML References
- HTML - Cheat Sheet
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Character Entities
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
- HTML Resources
- HTML - Quick Guide
- HTML - Useful Resources
- HTML - Color Code Builder
- HTML - Online Editor
HTML - <embed> Tag
The HTML <embed> tag is used as a container for external applications, multimedia, and interactive content that the browser doesn't understand.
For proper presentation, special programs or external plug-ins must be attached. The file type, attribute of the <embed> tag, and installed browser plugins all play a role in how embedded content is displayed.
Although HTML5's introduced the <audio> and <video> elements specifically for embedding multimedia in HTML documents, the <embed> element can still be used to incorporate both third-party applications and multimedia content.
Syntax
Following is the syntax of the HTML <embed> tag −
<embed src=" " ></embed>
Attributes
HTML embed tag supports both Global and Event attributes of HTML. It also accepts some specific attributes, which are listed below.
Attribute | Value | Description |
---|---|---|
height | pixels | Specifies the height of embedded content. |
src | URL | Specifies the URL of the embedded content. |
type | MIME_type | Specifies the MIME type of embedded content. |
width | pixels | Specifies the width of embedded content. |
Example: Embedding image
The examples will illustrate the usage of the HTML <embed> tag, including where, when and how to use it to embed images, HTML pages, videos, or audio. Lets look at a basic example where we embed an image on a webpage. However, we recommend using the <img> tag to display images −
<!DOCTYPE html> <html> <head> <style> h2 { color: #DE3163; } p { color: #7D3C98; font-style: verdana; } </style> </head> <body> <embed src="https://www.tutorialspoint.com/cg/images/logo.png" height="30" width="200"></embed> <h2>Welcome To The TutorialsPoint</h2> <p>The Best E-Way Learning</p> </body> </html>
Example: Embedding audio
The following example demonstrates how to use the HTML <embed> tag to place audio on a webpage. However, we recommended using the <audio> tag to display audio −
<!DOCTYPE html> <html> <body> <embed type="audio/mpeg" src= "https://samplelib.com/lib/preview/mp3/sample-3s.mp3"> </body> </html>
Example: Embedding video
Consider another scenario where we use the HTML <embed> tag to embed a video. Howevr, we recommended using the <video> tag to display video −
<!DOCTYPE html> <html> <body> <embed type="video/webm" src= "https://www.youtube.com/embed/9ZXZFVZviK4?si=D04mP_FPlyQTl6tL" width="400" height="300"> </body> </html>
Example: Embedding HTML Page
Consider another scenario where we use the HTML <embed> tag to embed an HTML page. However, we recommend using the <iframe> tag to display an HTML page −
<!DOCTYPE html> <html> <body> <embed type="text/html" src="/index.htm" width="500" height="200"> </body> </html>
Supported Browsers
Tag | ![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|---|
embed | Yes | Yes | Yes | Yes | Yes |