Frank Frank - 7 months ago 9
HTML Question

Trying to show YouTube video in web page

I am trying to show a YouTube video in a web page, but all that comes up is an empty box with a black border where the video should be. Here is the code.



<html>
<head>
<title>Granada High School Class of 1986 Graduation</title>
</head>
<body>
<iframe width="420" height="315"
src="https://www.youtube.com/watch?v=l_fN8LXco2A?autoplay=0">
</iframe>
</body>
</html>

Answer

Try this code. This is provided by Youtube when you click share and then embed:

enter image description here

<iframe width="560" height="315" src="https://www.youtube.com/embed/l_fN8LXco2A" frameborder="0" allowfullscreen></iframe>

Hope it helps