HTML5ANDCSS3 logoHTML5ANDCSS3Tools and Tutorials
  • Insights
  • Verify Certificate
HTML5ANDCSS3 logoHTML5ANDCSS3Tools and Tutorials
HTML5ANDCSS3 logoHTML5ANDCSS3Tools and Tutorials

HTML5andCSS3.org helps developers learn modern frontend skills with practical tutorials, production-ready snippets, and fast web tools built for everyday coding.

Quick Links

  • About Us
  • Contact Us
  • Privacy Policy
  • Copyright
  • Disclaimer

Top Tools

  • Try It Editor
  • JSON Formatter
  • CSS Minifier
  • HTML Minifier
  • Base64 Encoder / Decoder

Contact

  • business@html5andcss3.org
Newsletter

Learn at your own pace, practice with useful tools, and build websites you're proud of.

© 2011-2026 html5andcss3.org. All rights reserved.

How to Use

HTML Tags

HTML Tags

HTML <!DOCTYPE> TagHTML <html> TagHTML <head> TagHTML <title> TagHTML <body> TagHTML <base> TagHTML <link> TagHTML <meta> TagHTML <style> TagHTML <script> TagHTML <h1 to h6> TagHTML <hgroup> TagHTML <p> TagHTML <br> TagHTML <wbr> TagHTML <hr> TagHTML <pre> TagHTML <b> TagHTML <strong> TagHTML <i> TagHTML <em> TagHTML <mark> TagHTML <small> TagHTML <del> TagHTML <ins> TagHTML <sub> TagHTML <sup> TagHTML <u> TagHTML <blockquote> TagHTML <q> TagHTML <cite> TagHTML <abbr> TagHTML <address> TagHTML <bdo> TagHTML <bdi> TagHTML <a> TagHTML <nav> TagHTML <ul> TagsHTML <menu> TagHTML <ol> TagHTML <dl> TagHTML <img> TagHTML <figure> TagHTML <figcaption> TagHTML <audio> TagHTML <video> TagHTML <source> TagHTML <track> TagHTML <embed> TagHTML <object> TagHTML <param> Tag (Obsolete)HTML <picture> TagHTML <canvas> TagHTML <map> TagHTML <area> TagHTML <table> TagHTML <caption> TagHTML <thead> TagHTML <tbody> TagHTML <tfoot> TagHTML <tr> TagHTML <th> TagHTML <td> TagHTML <col> TagHTML <colgroup> TagHTML <form> TagHTML <input> TagHTML <textarea> TagHTML <button> TagHTML <select> TagHTML <selectedcontent> TagHTML <option> TagHTML <optgroup> TagHTML <label> TagHTML <fieldset> TagHTML <legend> TagHTML <datalist> TagHTML <output> TagHTML <meter> TagHTML <progress> TagHTML <header> TagHTML <footer> TagHTML <article> TagHTML <section> TagHTML <aside> TagHTML <main> TagHTML <search> TagHTML <details> TagHTML <summary> TagHTML <dialog> TagHTML <time> TagHTML <noscript> TagHTML <slot> TagsHTML <template> TagHTML <shadow> Tag (Obsolete)HTML <center> TagHTML <font> TagHTML <big> TagHTML <strike> TagHTML <tt> TagHTML <acronym> TagHTML <applet> TagHTML <frame> TagHTML <frameset> TagHTML <noframes> TagHTML <marquee> TagHTML <blink> TagHTML <s> TagHTML <var> TagHTML <kbd> TagHTML <samp> TagHTML <code> TagHTML <dfn> TagHTML <div> TagHTML <span> TagHTML Comment TagHTML <data> TagHTML Ruby Annotations: <ruby>, <rt> and <rp>HTML <svg> TagHTML <basefont> Tag
  1. Home
  2. /
  3. Tutorials
  4. /
  5. HTML Tutorial
  6. /
  7. HTML <embed> Tag

HTML Tags

HTML <embed> Tag

The <embed> tag in HTML is used to embed external content such as videos, audio, PDFs, or interactive media (like SVGs or Flash) directly into a webpage.
It is a self-closing tag and doesn’t require a closing tag. It serves as a generic container for external resources when specific tags (like <video> or <audio>) are not suitable.

Syntax

html

<embed src="filename" type="mime/type" width="600" height="400">

Attributes

AttributeDescription
srcSpecifies the path (URL) of the external file to embed.
typeDefines the MIME type of the embedded content (e.g., video/mp4, application/pdf).
widthSets the width of the embedded content (in pixels).
heightSets the height of the embedded content (in pixels).

Example

Embedding a PDF File

html

<embed src="https://ik.imagekit.io/html5andcss3/lesson-samples/sample.pdf" type="application/pdf" width="700" height="500">

Embedding a Video File

Embedding a Video File

html

<embed src="https://ik.imagekit.io/html5andcss3/lesson-samples/sample_video.mp4" type="video/mp4" width="640" height="360">

Browser Support

Chrome
Edge
Firefox
Safari
Opera
IE9+
YesYesYesYesYesYes

The PDF file appears inline with scroll and zoom options inside the page.
The video plays directly inside the defined area if supported by the browser.

Notes

  • <embed> is a generic container for external content; use it when a specialized element (like <audio>, <video>, or <object>) isn’t suitable.
  • Many use-cases (video/audio) are better handled by <video> / <audio> because those provide built-in controls and better accessibility.
  • For documents (PDF) consider <iframe> or <object> as alternatives - browser UI and print/zoom support may differ.
  • Some embedded content types may require browser plugins or specific MIME handlers; these cases can produce inconsistent behavior across browsers.
  • Security: avoid embedding untrusted content. Use correct type and host files over HTTPS to prevent mixed-content issues.
  • Accessibility: provide fallback content and ensure embedded content is reachable via keyboard/screen readers when applicable.
  • Sizing & responsiveness: use CSS (or wrapper elements) to make embedded content responsive; fixed width/height can break layouts on small screens.

Conclusion

The <embed> tag is a versatile tool for embedding various types of media into a webpage.
While it provides a simple way to display external content like PDFs or videos, it lacks advanced playback controls - so for audio or video content, dedicated tags like <video> and <audio> are generally preferred.

PreviousHTML <track> TagNextHTML <object> Tag