Create a Responsive YouTube Embed

Looking for this instead? How to Embed a YouTube Short

Copy the paste below and replace the embed string for a full width display.

<div class="ratio ratio-16x9">
    <iframe src="https://www.youtube.com/embed/h-FMndW2kHo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>

Results:


Copy the paste below and replace the embed string for a fixed width display.
Example below uses 400px fixed width.

 

<div style="max-width: 400px; margin-left: auto; margin-right: auto;">
    <div class="ratio ratio-16x9">
        <iframe src="https://www.youtube.com/embed/h-FMndW2kHo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
    </div>
</div>

Results:

your next platform and the growing journey

Build The Website Your Business Can Grow Into

Tell us what your customers need, how your team operates, and where the business is going. We will help map the right CMS Max foundation.