Why doesn't my YouTube video appear?

I'm just trying to show a YouTube video on my site, but instead I get an empty video form. Does anyone know why this could be and how to fix it? Thank you Here is part of my code:

<DOCTYPE html>
<html>
<head>
</head>
<body>
<iframe width="420" height="345" 
src="http://www.youtube.com/watch?v=nIsCs9_-LP8">
</iframe>
</body>
</html>
+5
source share
1 answer

The key problem is the Youtube URLmissing part embed. Each video Youtubehas an option embedded.

You have:

http://www.youtube.com/watch?v=nIsCs9_-LP8

However, we need to remove watch?v=and add embed/:

http://www.youtube.com/embed/nIsCs9_-LP8

The first link is for the Youtube site (not only for the video, but for the entire site). The second version is a video for the video itself, which must be embedded on your site.

( Youtube):

<iframe width="420" height="315" src="http://www.youtube.com/embed/nIsCs9_-LP8" frameborder="0" allowfullscreen></iframe>
+12

All Articles