Embed Youtube Videos in Iframes

By Posted 2010 Updated   Tutorials

Using iFrames is the new and better way to embed Youtube videos. Youtube has been providing this option to webmasters for some time, especially those who like embedding youtube videos in articles and blog posts, but how many have actually used it.

Check the embed options below Youtube videos –

youtube iframe code

This is how an embedded video code looks like

 <object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/kffacxfA7G4?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/kffacxfA7G4?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>
</object> 

Now the iframe code looks looks like this

<iframe title="YouTube video player" type="text/html" width="425" height="349" src="http://www.youtube.com/embed/kffacxfA7G4" frameborder="0"></iframe> 

Why Use Iframe Embed Codes?

Your viewers will be able to view your embedded video in Flash or HTML5 players, depending on their viewing environment and preferences. HTML5 is the future and if HTML5 isn’t supported by the user, they display Flash. Another futuristic use is that it will finally allow embeds to work on mobile devices, which typically use a built-in player instead of Flash or HTML5.

Do you use iframe codes to embed Youtube videos?


16 comments on “Embed Youtube Videos in Iframes

  1. hadiqa says:

    hey thanks..how to put adsense in this iframe ?

    • QuickOnlineTips says:

      Youtube provides you the option to select iframes when you select embed code options.

  2. Pedro Da Silva says:

    Thanks for this info.

    I think this is great tip because of more and more users accessing sites on their mobile devices.

  3. BlogTipss says:

    I will try Iframes . Thats what I looking for. Great post.

  4. Sunil says:

    i will try iframes right now….
    will post the updates in sometime….

  5. Sunil says:

    i am not getting the iframe option :(

  6. Sunil says:

    can anyone tell me where can i find the iframes code ?

  7. Julian says:

    it is just like Vimeo’s
    they set the iframe as default embedding rather than object embedding

  8. Namit Gupta says:

    I had several times tried watching YouTube videos in HTML5 player. But never got satisfied. Always encountered with some or the other problem. Is this happening with everyone, is HTML5 player not very stable at this time?

  9. Vibin says:

    hey sunil,You can find the iframes code by
    Click “embed” below video>click “use iframes embed code”>copy the code>use in your blog post.

  10. Josh Stauffer says:

    I don’t currently use iframes to embed YouTube videos but you make some good points. This is worth considering. Thanks!

  11. Terry Davies says:

    I like this iframe option very much. very economical.
    one issue I have is how to autoplay when using iframe
    any suggestions?

  12. Henrik says:

    oops x came out as a hyperlink

    i meant to say using a href

  13. extasy says:

    thank you very macht

  14. Sony says:

    I am not using you tube Iframe usally i just put the embed code in my blog .

Leave a Reply

Your email address will not be published. Required fields are marked *




css.php