The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Youtube Embed not showing up Reply To: Youtube Embed not showing up


I see the video embedded in your pen, but the question is — do you want to show a thumbnail or an embedded video?

To show a YouTube video’s thumbnail on your page, use any of these:
<img src="">
<img src="">
<img src="">
<img src="">

To show a YouTube video itself on your page, use this:

<iframe width="200" height="100" src="//" frameborder="0"></iframe>

Note though, that this embed code will NOT work when you run your page straight from your hard drive (and not through a webserver). Because it will then not use http or https, it will not know how to get the YouTube video, so you’ll have to use this:

<iframe width="200" height="100" src="" frameborder="0"></iframe>