Adding a YouTube Video to Your Website

Step 1: Find the YouTube Video

Go to YouTube and find the video you want to add to your website.

Step 2: Get the Embed Code

Click on the "Share" button below the video and then click on the "Embed" option. Copy the provided embed code.

Embed Code

Step 3: Add the Video to Your Webpage

Open your HTML file in a text editor and locate the section of your webpage where you want to add the video. Paste the embed code into that section.

Add Video to HTML

Step 4: Adjust the Video Size (Optional)

If you want to adjust the size of the video, you can modify the width and height values in the embed code. For example:

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

Step 5: Save and View Your Webpage

Save the changes to your HTML file and open it in a web browser to see the YouTube video embedded on your webpage.