Working with the embed markup element in your HTML5 web pages

HTML5 introduced lots of new markup elements. One of the new markup elements is the "embed" element. The embed element is one of the elements which is used to embed content in a web page and is used wherever external embedded content is expected.

The content to be embedded is specified via the src attribute of the embed markup element.

The itemprop attribute cannot be specified unless the src attribute is also specified.

The type attribute is used to indicate the Mime type of the plugin which needs to be instantiated.

There is no fallback content (no alt attribute) on the embed markup element.

Hands-On

Let us build a simple web page which embed a shockwave file. HTML5 recognized swf as one of the registered plugins and when the page is opened in a browser, the Shockwave content is displayed in the browser.

In this article, we learned about the embed markup element. I hope you have found this useful.

About the author

Vipul Patel is a Program Manager currently working at Amazon Corporation. He has formerly worked at Microsoft in the Lync team and in the .NET team (in the Base Class libraries and the Debugging and Profiling team). He can be reached at vipul.patel@hotmail.com