Guide
How to Autoplay Video on a Website
Updated September 2026 · 6 min read
Why autoplay is blocked
To protect users from unexpected sound, browsers allow autoplay only when the video is muted (or after the user has interacted with the site). Muted autoplay is always allowed.
Autoplay an HTML5 video
<video autoplay muted loop playsinline poster="poster.jpg">
<source src="clip.mp4" type="video/mp4">
</video>playsinline keeps the video in the page on iPhone instead of opening fullscreen.
Autoplay a YouTube or Vimeo embed
YouTube: add autoplay=1&mute=1. Vimeo: add autoplay=1&muted=1. Our YouTube and Vimeo generators add these for you.
Details for YouTube: How to autoplay embedded YouTube videos.
When not to autoplay
Long videos with important audio.
Several autoplaying videos on one page.
Pages where speed matters most — autoplay loads the video immediately.
On this page
Frequently asked questions
Related
Add ?autoplay=1&mute=1 to the YouTube embed URL.How to autoplay embedded YouTube videos
HTML Video Tag: Complete Guide
The HTML <video> element plays video files natively.HTML Video Tag: Complete Guide
YouTube Embed Code Generator
Paste any YouTube link and get a free, responsive embed code in seconds.YouTube Embed Code Generator
How to add a video background
Use a short, muted, looping MP4 behind your content, with a poster image and a dark overlay for readable text.How to add a video background