How to Embed a YouTube Video Into Your Website

Step 1: Open YouTube

Open YouTube in your browser by entering https://www.youtube.com into the address bar.

Step 2: Search

At the top of the homepage, search for your video that you want to embed and click the magnifying glass.

Step 3: Find the Video

Choose your video from the results that appear by clicking on the thumbnail.

Step 4: Share

Click the "share" button at the bottom-right corner of the video player that now appears. Once clicked, a pop-up with more options will appear.

Step 5: Choose to Embed

Click the "embed" button that appears as the first option in the row of possible actions. This button will feature angle brackets like this: <>

Step 6: Accessing the <iframe> Code

Double-click on the iframe element's code that now appears on the screen. This will be the code you will use to embed your YouTube video on your webpage.

Step 7: Copying

Click the "copy" button at the bottom-right corner of the window, as shown below. The iframe code has now been copied to your clipboard!

Step 8: Pasting

Paste the iframe code into your HTML file by pressing Ctrl + V. Add some CSS styling to center the video or adjust its appearance, if you prefer to do so. Congratulations! You have successfully embedded your video.