What is the <embed> element in HTML?

The <embed> element is used to define a container for an object from an external source. This allows users to embed webpages, videos, audio, and images into their web pages. To include the tag in your webpage, you only need the opening tag (<embed>).

Related tags

Different tags specific to the type to their type of media content can be used instead of the <embed> tag as well. Some of these are:

Tag

Object referenced

<img>

This tag is used to display a picture

<video>

This tag is used to embed a video

<audio>

This tag is used to embed an audio file

<iframe>

This tag is used to display an HTML page

Attributes

The <embed> tag supports global attributesattributes common to all HTML elements (e.g. class, id, lang, title, etc.) It also supports event attributesattributes connected to action events (e.g., user clicks a piece of text.)

CSS styling

CSS styling can be used to modify the appearance of the embedded object. Properties like height, width, etc. can be used.

Code

The following code example shows how an image can be embedded into a webpage.

New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved