DEV Community

Cover image for Embed a Youtube Video Into Your HTML Website - 2 Easy Steps
sameer8saini
sameer8saini

Posted on

Embed a Youtube Video Into Your HTML Website - 2 Easy Steps

Complete blog post here Embed a youtube video into a HTML Website

Why Embed A Youtube Video Into Your Website?

In a successful blog post or a high converting website page, the most important thing is content. 

Content is what keeps the reader engaged with your website page or blog. 

Sometimes you may have the best content and clear instructions on your web page but there still may be some parts that could miss in writing text and screenshots.

This is where videos come in handy. Not only do they provide clear and concise information, but also a good engagement with the viewer.

Something as simple as adding a youtube video to your website can be the striking difference between the user staying on your website or just moving away from it.

Embedding a youtube video by a link that nobody will click is useless but if the viewer can see a clear youtube video right there in your HTML Website could be amazing. 

This is not the easiest thing that is taught to everybody in our daily lives but in this post, we will show you how you can embed a youtube video in your website in 5 easy steps.

1. How To Get The Embed Code For Your Website

Getting the embedding code for the youtube video is very easy and youtube helps us with that. 

Before you get the code, you have to research what video you are going to embed. It could be a video that you own or a video on youtube that clearly shows what you are trying to say. It could also be a video that you have on your PC, you can use that video and upload it on youtube and then use that video.

Once you have found the video you want to embed in your HTML Website, just open that video in your favorite browser.

Embed Youtube Video In HTML Website

The next thing is to click on the "Share" button that you see below the video

Click on the "Share" button and that should open a window that will have all the options you can use to share this video.

Youtube embed options

Click on the "Embed" button and that should give you some HTML code like in the image below

Select and copy the embed code

2. Adding The Youtube Embed Code To Your HTML Website

Now that we have the youtube embed code ready, it's now time to copy this to the HTML file of your website.

Open the HTML or website page you want to add the video to and then paste the copied code into the HTML. 

Although it's fairly simple, If you have limited knowledge about website development, you may need a web developer who can do this for you. Understanding where is your HTML file is located could be a tough one to find but somebody who knows a bit of web stuff could be your best buddy.

Paste the code in your HTML and publish the changes. 

The Result Looks Something Like This - An Embedded Youtube Video In Your Website


Top comments (0)