Hello techies, Today’s topic – How to Center Align Embedded YouTube Video? When you want to embed a YouTube video to your webpage or post then the most important things come’s in mind ” How to align an embedded video to center?“, It simply means the Centre Alignment of a video.
Today, I am going to tell you a very simple method for center alignment. Before that let’s know how will You Embed a youtube video. Well, YouTube has its own set of Functionality.So it supports sharing of a video on social platforms like Facebook, Linkedin, tumbler, and Twitter. It also gave you an embed code to embed a video on someone’s site. Let’s see how will you get the embed code of a video on youtube?
How to Center Align Embedded YouTube Video?
First of all, you need to play the video which you want to embed. Once you played you will see a “share” button in the left corner of the player.
Click on the share button.Here you have the option to share the video on Social platforms like StumbleUpon, Facebook Twitter, Pinterest and more.So if you want to share, you can.Now there is an Embed Button below, You just have to click on that.
Once you clicked on the embed button, you will get some sort of HTML code which you need to place on your website.
The embed video code will be off the form –
<iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/lu0gu09Ct3g” frameborder=”0″ gesture=”media” allow=”encrypted-media” allowfullscreen></iframe>
Now comes the main trick, If you just copy and paste the code into your site or post it will automatically align the video to the left.So, If you want to align it to center you just need to add an HTML tag before the Iframe opening tag and after the Iframe closing tag. The tag which you need to add is – center opening and center closing tags.
<centre> Copied embed codes </centre>
Like this – <centre> <iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/lu0gu09Ct3g” frameborder=”0″ gesture=”media” allow=”encrypted-media” allowfullscreen></iframe></center>
I hope you might understand the things. You can also see the demonstration of all these activities on Youtube here.
Read More: Twenty Simple Hacks Everyone should know
If you have any query then just comment down.Thank YOU.