The star of the show is the video tag. At its simplest, it just needs to know the source of the video file.
The controls attribute is a boolean attribute. You don't need to set it to a value (controls="true" is unnecessary); its mere presence turns the feature on.
Result: You now have a fully functional video player on your page, complete with a play/pause button, a timeline scrubber, volume controls, and a fullscreen option. This is the simplest, most effective way to embed a video.
This attribute will make the video start playing as soon as the page loads. code Html CRITICAL CAVEAT: Modern browsers (Chrome, Safari, Firefox) will block autoplay with sound because it's a terrible user experience. To make autoplay work, you almost always have to add the muted attribute as well.
Makes the video automatically restart from the beginning when it finishes. Great for background videos.
The good news is that the audio tag works almost identically to the video tag, just without the visual component.
The Problem: How do we embed a sound file (like a song or a podcast) with player controls? The Solution: Use the audio tag with the controls attribute.
Result: A clean audio player with play/pause, a timeline, and volume controls. It uses the same attributes like autoplay, loop, and muted.