- HTML Tutorial
- HTML - Home
- HTML - History and Evolution
- HTML - Overview
- HTML - Editors
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Headings
- HTML - Paragraphs
- HTML - Quotations
- HTML - Comments
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Style Sheet
- HTML - CSS Classes
- HTML - CSS IDs
- HTML - Images
- HTML - Image Map
- HTML Tables
- HTML - Tables
- HTML - Headers & Caption
- 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 - Iframes
- HTML - Blocks
- HTML Backgrounds
- HTML - Backgrounds
- HTML Colors
- HTML - Colors
- HTML - RGB
- HTML - HEX
- HTML - HSL
- 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 - 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 Code Builder
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - 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
HTML <embed> tag is used as a container for external applications, multimedia, and interactive content that the browser don't understand.
For their proper presentation, special programs or external plug-ins must be attached. The file type, attribute of the <embed> tag, and browser plugins installed all have a role in how embedded content is displayed.
Although HTML5's newly added <audio> and <video> elements are specifically used to embed multimedia in HTML documents, the <embed> element can be used to incorporate both third-party apps and multimedia content.
Syntax
<embed src=" " ></embed>
Attribute
HTML embed tag supports Global and Event attributes of HTML. Accepts some specific attributes as well which is listed below.
Attribute | Value | Description |
---|---|---|
height | pixels | Specifies the height of embeded content. |
src | URL | Specifies the URL of embeded content |
type | MIME_type | Specifies the MIME type of embeded content |
width | pixels | Specifies the width of embeded content |
Examples of HTML embed Tag
Bellow examples will illustrate the usage of embed tag. Where, when and how to use embed tag to embed image, html page, video or audio.
Embeding image using embed Tag
Let’s look at the basic example where we are going to embed an image on the webpage. We recomend you to use <img> tag to display images.
<!DOCTYPE html> <html> <body> <embed src= "https://www.tutorialspoint.com/cg/images/logo.png" height="30" width="200"> </embed> </body> </html>
Embeding audio using embed Tag
Following is an example where we are going to use the HTML <embed> tag to place audio on the page. We recomend you to use <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>
Embeding video using embed Tag
Consider another scenario where we are going to use the HTML <embed> tag to embed a video. We recomend you to use <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>
Embeding html page using embed Tag
Consider another scenario where we are going to use the HTML <embed> tag to embed a html page. We recomend you to use <iframe> tag to display 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 |
To Continue Learning Please Login
Login with Google