
215 views
How to mute video in HTML
To mute a video in HTML, you can use the muted
attribute of the <video>
tag. Here’s an example:
<video src="video.mp4" muted autoplay controls></video>
In the example above, the muted
attribute is added to the <video>
tag. This attribute ensures that the video plays without sound. The autoplay
attribute is included to make the video play automatically when the page loads, and the controls
attribute adds playback controls to the video player.
You can customize the src
attribute to point to the actual source file of your video. Additionally, you can style the video player using CSS to suit your design requirements.