How to Center align 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?
{Read:- 5 Ways to Improve SEO on Your WordPress Site }
How to Center align Embedded YouTube Video?
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>
{Read:- How to Build a WordPress Site in 1 Day }
Like this –
1 2 |
<centre> <iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/lu0gu09Ct3g” frameborder=”0″ gesture=”media” allow=”encrypted-media” allowfullscreen></iframe></center> |