Using the object and param Elements

The following code use the object element to embed the video.

 
<!DOCTYPE HTML> 
<html> 
    <head> 
        <title>Example</title> 
    </head> 
    <body> 
        <object width="560" height="349" 
                data="http://www.youtube.com/v/a2_6bGNZ7bA" 
                type="application/x-shockwave-flash"> 
            <param name="allowFullScreen" value="true"/> 
        </object> 
    </body> 
</html>
  
Click to view this demo.

The data attribute provides the location for the content. type attribute specifies the MIME type of the content so that the browser knows what to do with it.

The width and height attributes determine the size.

The name and value attributes from param element defines the parameters passed to the plugin. When there is no type attribute, the browser tries to determine the type of content from the data itself.

Home 
  HTML CSS Book 
    HTML  

object:
  1. Using the object and param Elements
  2. Specifying alternative Content
Related: