Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Playing a YouTube Video in HTML

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 244
    Comment on it

    To display a youtube video in your web page, you have to use an id (like XGSy3_Czz8k) that will be displayed by the youtube when you save (or play or share) a video. You can use this id, and embed your video in the HTML code.

    Following are the steps:

    1. Play or share the video to YouTube
    2. Note the video id generated by youtube(like XGSy3_Czz8k)
    3. In your html code define an iframe element
    4. Give the video URL to src attribute
    5. Add the width and height attribute to give the dimensions of the player

    Example:

    <!DOCTYPE html>
    <html>
    <body>
    
    <iframe width="570" height="410"
    src="http://www.youtube.com/embed/XGSy3&#95;Czz8k">
    </iframe>
    
    </body>
    </html>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: