I can’t incorporate a Youtube video into my website

Asked

Viewed 828 times

0

I’m inserting the following iframe code to embed a Youtube video, but the code does not generate the video on the site, which I’m missing?

I took this part of the code in a code I saw and just changed the l

Only a gray border appears, but the video is not available on the site.

code:

<iframe width="560" height="315" src="https://www.youtube.com/watch?v=dvPo7JUAP8k"> </iframe>

2 answers

3

the value of the attribute src is wrong, because the link that is is the video preview, the embed link is different to embed it, you must enter the desired video and click share right after embedding the link and the html code already generated

3

The correct format of src it’s like below:

https://www.youtube.com/embed/ + video code

In your case, it would look like this:

<iframe width="560" height="315" src="https://www.youtube.com/embed/dvPo7JUAP8k"> </iframe>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.