The playsinline Attribute, Explained
The playsinline attribute on a <video> element is a simple but easily misunderstood flag. When present, it tells mobile browsers to play the video in its original position on the page rather than automatically switching to a fullscreen player. Without it, mobile browsers (particularly iOS Safari) will launch the video into fullscreen as soon as playback starts.
Here’s the attribute in its most basic usage:
<video src="..." controls playsinline></video>
The difference is visible immediately: without playsinline, the video takes over the entire screen; with it, the video stays embedded in the layout. The user can still tap a fullscreen button to expand the video manually, so adding playsinline doesn’t remove that capability—it merely makes inline playback the default behavior. In that sense, it’s a sensible default for most pages, even though the browser doesn’t treat it that way on its own.
This attribute shows up most often in the group of attributes commonly used to make video behave like an animated GIF. For that effect, you need all four of these:
<video autoplay loop muted playsinline src="..."></video>
The autoplay attribute alone won’t trigger playback on mobile. You also need muted and playsinline in addition to autoplay; without any one of them, the video won’t start on its own. Keep loop if you want the GIF-like repeating behavior, but you can drop it without breaking autoplay.
Another practical note concerns thumbnails. On mobile—especially iOS—the only reliable way to display a preview image before playback is with the poster attribute. Even if you use preload, the video area will be blank white until the user taps play.
Without a poster:

With a poster:
<video
src="movie.mov"
poster="thumbnail.jpg"
controls
></video>mo
If you skip the poster, you’ll be left with a floating play button over an empty area, which can look disjointed from the rest of the layout. Adding a visible border or background to the video element can help delineate that space visually until playback starts.




