Sunday, July 31, 2011

Embed youtube video in HTML

 The following code will embed a you tube video to your html page. The attributes, value and src of param with name movie and embed tags respectively holds the url to the video, which is being embedded. The last segment of the url is the video ID (which is used to identify a video). The ID in the following example is rxUm-2x-2dM. 

<object width="425" height="350">
             <param name="movie" value=""/>
             <param name="wmode" value="transparent" />
             <param name="allowFullScreen" value="true" />
             <embed src=""
                      wmode="transparent" width="425" height="350"

Furthermore video options such as height, width, mode, full screen can be specified, as shown in the example.  Details about video options can be found at


No comments:

Post a Comment