Chapter 10: Embedded Media


TOP

'iframe' element

'iframe' element. Short for 'inline frame'. Embeds a separate document or resource into a document. iframes can embed html pages, txt documents, videos, images, et cetera.

Multipurpose Embedder (Object)

'object', 'embed', 'param' elements. The object element is a multi-purpose object placer that can be used to place an image, create a nested browsing context similar to an iframe, or embed a resource that must be handled by a plugin. The 'embed' element is used for plugins only, and is now not used. Plugins are becoming less popular as HTML and browser capabilities improve, so the 'object' element is becoming unpopular. An object may contain 'param' elements to set parameters specific to the type of media.

Video Element

'video' element. With this, a video can be directly embedded from your own server into your webpage. Browser support for various video file types are inconsistent, so sometimes providing a cascade of potential version options can be the best solution to reaching as many people as possible.

Audio Element

Canvas Element

'canvas' element. In the HTML, only a width and height attribute must be provided. A canvas is like a container that can display something drawn with JavaScript. With this, the element can dynamically draw things on the fly and respond to user input. This allows content of a canvas element to be animated and even contain playable games. The drawing area is raster-based.

If your browser does not support the HTML5 canvas element, you will see this message.

EXERCISE: Embedding a video with iframe

This is iframe html code taken from Youtube to embed a Youtube video.