HTML YouTube Video Player Code

Create your YouTube Gallery widget
Screenshots
Why People Love Elfsight
Videos turn static content into something dynamic. The Elfsight YouTube gallery makes that easy. You can embed a single video or entire channels, add YouTube Shorts, or show playlists – all in a gallery that looks like part of your page.
Setup is simple: get the HTML code required, paste it into your page, tweak design settings, and publish. No plugins, no complicated installs. It feels like sliding a piece of functionality into place.
Did you know?
Wistia State of Video Report found that visitors spend 1.4 times more time on pages with embedded videos rather than those without them.
Give visitors more reasons to stay longer on your website – add the Elfsight YouTube Video widget to your HTML website.
Key Features of the HTML YouTube Video Player
Here’s what makes Elfsight’s gallery so useful:
- Custom content sources: Use a full channel, a playlist, or individual videos – whichever fits your content plan.
- Flexible layouts: Grid, list, carousel, or popup styles; you control thumbnails, titles, and playback behavior.
- Responsive design: Looks good on phones, tablets, and desktops automatically.
- Lightweight load: Only videos in the initial view load immediately; others load on demand to keep your page fast.
- Customization options: Adjust fonts, colors, thumbnail sizes, header info – so it matches your design.
See all features in action in the live editor now – no signup needed.
How to Add YouTube Videos to HTML
Here’s a simple way to embed YouTube video content on your HTML website:
- Select a Template: Open the Elfsight editor and select a template.
- Customize the Widget: Paste in your video, channel or playlist URL, customize layout, header, thumbnails, and style.
- Generate the Code: Click “Add to website for free” and copy the HTML embed code.
- Embed on Website: Open your HTML file, paste the snippet where you want the gallery to appear.
Need extra help? Visit our Help Center, see our blog on how to embed YouTube videos to your website, or suggest features on our Wishlist. For bugs and recent updates, check the Changelog.