How to embed a Youtube video into your webpage in HTML

Websitecode Avatar

Start by finding the video you want to embed on YouTube.

Once you’ve chosen the video, click the “Share” button below it. From the options that appear, select “Embed.” YouTube will provide you with a code snippet that looks something like this:

<iframe width="560" height="315" src="https://www.youtube.com/embed/4N1T4fRqC7Q?si=2lZNHvF9j_B0Z0tN" allowfullscreen></iframe>

Copy this code and paste it into your HTML file wherever you want to embed the youtube video.
This could be within an article, on a specific page, or even on your homepage.
If you are just testing try our Free Online HTML editor

Save the file and open it in your browser to see the embedded video. It’s as simple as that!


Websitecode Avatar

Leave a Reply

Your email address will not be published. Required fields are marked *


preloader