Tuesday, March 8, 2011

How to add a video to a webpage using HTML?

Syntax:  <iframe src =""></iframe>
For example:  to add a video to a webpage which is in You Tube, Give title u r using i.e. YouTube video player. Then give the source of video i.e. URL . Use embed to avoid whole web page of youtube showing that video which you want to add to your webpage. Lets see an example of a program showing how to add video......

<html>
<head>
<title>Tum Jo Aaye song</title>
<body>
<iframe title = "YouTube video player"height="390" width = "480"src = "http://www.youtube.com/embed/KfCdIr-E1Bs"frameborder="0" allowfullscreen></iframe>
</body>
</head>
</html>
See the source of URL. Actually  real URL ishttp://www.youtube.com/watch?v=KfCdIr-E1Bs&feature=player_embedded#at=231  . We used Embed to avoid whole Page .

No comments:

Post a Comment