HTML <embed> tag
HTML <embed> tag : Definition
• The HTML <embed> element is generally used to embed external application, multimedia content like a picture,an audio, a video or a plug-in application into an HTML document.
• The <embed> tag has never been an element of the HTML 4 specification.
• The <embed> tag is included in HTML5 as a standard.
== IMPORTANT NOTE ==
To display a picture, it is recomended to better use the <img> tag.
To display HTML file type, it is recomended to better use the <iframe> tag.
To display video or audio, it is recomended to better use the <video> and <audio> tags.
Attributes
Attribute | Value | Description |
---|---|---|
height | pixels | Specifies the height of the embedded content |
src | URL | Specifies the address of the external file to embed |
type | media_type | Specifies the media type of the embedded content |
width | pixels | Specifies the width of the embedded content |
<embed> tag example :
<!DOCTYPE html> <html> <body> <h1>The image embeded example</h1> <embed type="image/jpg" src="app-assets/images/course-images/html-tutorial.png" width="300" height="200"> </body> </html>
OUTPUT :
The image embeded example
Example 2: html document embeded example
<!DOCTYPE html> <html> <body> <h1>The html document embeded example</h1> <embed type="text/html" src="html-tutorial.php" width="500" height="200"> </body> </html>
Output :
The html document embeded example