Youtube video not showing

Youtube video not showing
0.0 0

#1

i have tried to add a video to my page but is just not showing. I have even try to add the “embed” to the link but still not working.


#2

Hi !

You got a gap in your code.

First, you don’t have to use HTML tag <video></video> to display your video using <embed></embed>.

Here is your code (this does not work):

<video><iframe width="1351" height="480" src="https://www.youtube.com/embed/v8kFT4I31es" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></video>

Good practice (this works) use <div></div> instead :

<div><iframe width="1351" height="480" src="https://www.youtube.com/embed/v8kFT4I31es" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div>

Hope this helps !

Happy coding journey :wink: