Muted inline autoplay is a request to the browser, not a guarantee, so the page must still work when playback does not start.
Use autoplay with muted and playsinline, add loop only when needed, provide a poster and fallback, and respect user motion and data preferences.
Autoplay example
<video autoplay muted playsinline loop poster="POSTER-URL" class="h-auto w-full">
<source src="VIDEO-URL.mp4" type="video/mp4">
<source src="VIDEO-URL.webm" type="video/webm">
<a href="VIDEO-URL.mp4">View the video</a>
</video>Why each attribute matters
autoplayasks the browser to begin playback.mutedis normally required for autoplay policy and prevents unexpected audio.playsinlinerequests inline playback on compatible mobile browsers.looprepeats playback and should be omitted when repetition is distracting or unnecessary.posterprovides a useful visual before playback and when playback is unavailable.
