HTML embed Tag - HTML Tutorial

HTML embed Tag

BLUF: Mastering HTML embed Tag is a fundamental step in becoming a web developer. This guide covers the structure, syntax, and best practices for using this HTML element effectively.
Key Lesson: HTML embed Tag

Web structure starts with solid HTML. Learn how HTML embed Tag contributes to accessible and semantic web pages in the tutorial below.

HTML <embed> element is employed to insert an external document into an HTML file, such as a third-party application, multimedia, or interactive plugin. This feature was introduced in HTML5.

HTML <embed> tag is used to embed an external document in an HTML file which can be a third party application, multimedia, plugin(interactive content), etc. This element is new in HTML5.

Syntax

Example

<embed src="https://placehold.co/400x300/1abc9c/ffffff?text=Sample+Image" ></embed>

Here are some details regarding the HTML <embed> element:

Display block
Start tag/End tag Both Start and End tag
Usage Embed third-party applications

Example 1

Example

<!DOCTYPE html>

<html>

<head>

<title>Embed Tag</title>

<style>

	h2{

	color: #cd5c5c;}

	p{

	color: #20b2aa;

	font-style: italic;}

 </style>

</head>

<body>

<h2>Example of embed tag</h2>

<p>The Dancing Penguin</p>

<embed src="https://placehold.co/400x300/1abc9c/ffffff?text=Sample+Image" height="200" width="300"></embed>

</body>

</html>

Output:

Attribute

Tag-specific attribute

Attribute Value Description
height pixels It specifies the height of the embedded content
src URL It defines the resource location of the embedded document.
type media-type It specifies the MIME type.
width pixels It determines the width of the embedded content.

Global attribute

The <embed> element facilitates the incorporation of global attributes within HTML.

Event attribute

The <embed> tag enables the utilization of event attributes within an HTML document.

Supporting Browsers

Element Chrome IE Firefox Opera Safari
<embed> Yes Yes Yes Yes Yes

Input Required

This code uses input(). Please provide values below:

Logic Practice
Install Logic Practice
Add to home screen for a faster app-like experience