The Wayback Machine - https://web.archive.org/web/20240907011854/https://www.geeksforgeeks.org/how-to-mute-video-using-html5/
Open In App

How to mute video using HTML5 ?

Last Updated : 16 May, 2023
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

The purpose of this article is to mute video using HTML5.

Approach: Video Tag is new to HTML5. Users can use muted attributes in video tags to mute a video.

The muted attribute is a boolean attribute. When present, it specifies that the audio output of the video should be muted.

Syntax:

<video controls muted>

Example: In this example, we are using the above-explained approach.

HTML




<!DOCTYPE html>
<html>
<body>
    <h1>Muted Video</h1>
    <!-- Video mute -->
    <video controls muted width="600px">
        <source src=
                type="video/mp4">
    </video>
</body>
</html>


Output:


Previous Article
Next Article

Similar Reads

How to display play pause and mute buttons in HTML5 ?
To display play, pause, and mute buttons in an audio file through HTML5, we can use JavaScript methods such as "play()", "pause()" and ".muted". With this feature of audio display with only play, pause, and mute buttons, we're essentially giving the user control over the playback of the audio file according to their preference. Syntax to display Au
2 min read
How to mute the audio using amp-audio of Google AMP ?
Introduction: Since the release of HTML5, audios can be added to webpages using the “audio” tag. Previously audios could be only played on webpages using web plugins like Flash. The “audio” tag is an inline element which is used to embed sound files into a web page. It is a very useful tag if you want to add audio such as songs, interviews, etc on
2 min read
How to mute audio using HTML?
Mute the audio by using the muted attribute in the &lt;audio&gt; tag of the HTML document. It is used to define that the audio should be muted on the webpage. Syntax:&lt;audio controls muted&gt;Example: The example shows, mute audio using HTML5, include the 'muted' attribute within the &lt;audio&gt; tag to ensure the audio starts muted by default.
1 min read
How to make HTML5 Video Poster be same Size as Video Itself ?
To make an HTML5 video poster the same size as the video itself to achieve this you can use the HTML5 &lt;video&gt; elements, you can specify a poster frame that will be displayed before the video starts playing. To ensure that the poster image is the same size as the video itself, you should use an image with the same dimensions as the video. Belo
3 min read
How to add video in HTML5 ?
In This article, we will define how to add video content using a &lt;video&gt; element in the document. Before HTML5 came into existence, videos could only be played in a browser using a plugin like flash, but after the release of HTML5, adding a video to a web page is easy as adding an image. The HTML5 “video” element specifies a standard way to e
1 min read
How to set the height and width of the video player in HTML5 ?
In this article, we will learn to set the width and height of the video player in HTML5. The following are the two scenarios The width and height of the video are fixed.Make the video respond to your screen width. Approach: The HTML5 width and height attributes of the video tag are used to set the height and width of the video player respectively.
2 min read
How to Hide Full Screen Button of the Video Tag in HTML5 ?
The &lt;video&gt; element is used to embed video content on the web page. It allows the addition of video files in many formats such as MP4, WebM, etc. This element supports attributes like controls, autoplay, and loop to control video playback. It also enables the addition of captions and subtitles for accessibility. Preview: Approach:Create a str
1 min read
How to add Label above Video in HTML5 ?
In HTML5, putting a label above a video is important for helping users understand and interact with the content better. There are two easy ways to do this: using the figure and figcaption elements, or just the label tag itself. By using these methods, you can easily add informative labels above your videos, making them more accessible and improving
2 min read
How to Generate Video from Images in HTML5 ?
Generating a video from images in HTML5 involves utilizing HTML, CSS, and JavaScript to dynamically create a video by stitching together a sequence of images. Additionally, the transition effects and frame rate control ensure a seamless and optimized viewing experience for the generated video. ApproachThe HTML file contains a basic structure with a
3 min read
How to Play Video in Reverse in HTML5 ?
To play a video in reverse in HTML5, you can use JavaScript to control the playback direction. This involves manipulating the video's current time property to decrement it, creating the effect of reverse playback. This technique allows for custom control over video playback behavior directly within the browser. PrerequisitesHTMLCSSJavaScriptApproac
2 min read
How to display video controls in HTML5 ?
The HTML &lt;video&gt; controls attribute is used to display video controls in HTML5. It is a Boolean attribute that adds video controls like volume, pause, and play. HTML5 commonly uses formats such as OGG, MP4, OGM, and OGV because browser support for these formats varies. Syntax &lt;video controls&gt; &lt;source src="video-file.mp4" type="video/
3 min read
How to define the URL of the video file in HTML5?
In this article, we will learn how to define the URL of a video in HTML. The &lt;video&gt; tag is used to embed video files on a web page. This displays a video player along with the player controls depending on the browser. The source of the video can either be a singular one or it can be made to support multiple formats of the video so that multi
3 min read
How to preload the video when the page loads in HTML5?
The HTML &lt;preload&gt; attribute is used to specify the way the developer thinks the video should be loaded when the page loads. Syntax&lt;video preload=""&gt; &lt;/video&gt;There are 3 values for preload attribute auto, metadata and none. Note: An empty string leads to the default auto attribute value. Example 1: The following example demonstrat
1 min read
How to Play a Small Clip from a Long Video in HTML5?
Playing a specific clip from a longer video in HTML can enhance user experience and streamline content delivery. Sometimes, you may have a long video but only want to showcase a specific portion of it on your website. In such cases, playing a small clip from a longer video can be useful. HTML5 offers several approaches to achieve this seamlessly. M
3 min read
Difference between Compunent Video and S-Video
1. Compunent Video :: It is also know as RCA video. This video has been split into two or more component channels. This is provide a high quality of picture Composite video are contains both the chrominance and luminance information, along with synchronization and blanking pulses. 2. S-Video : It is also known as separated video. This is provide a
2 min read
How to change the font of HTML5 Canvas using a button in Angular.js?
In this article, we are going to learn about how to change the font of HTML5 Canvas using a button in AngularJS. With the help of a click font's property can change by the user whether it is font-size or font-style. Syntax: For font size (Change the font size accordingly): variable.fontSize = "100px" For font style (Change the font style accordingl
2 min read
How to group header content of a table using HTML5 ?
In this article, we define to group the header content in a table by using the &lt;th&gt; tag in HTML to set the header cell of a table. Two types of cells in an HTML table. Header Cell: It is used to hold the header information. Standard Cell: It is used to hold the body of data. The working of both tags (&lt;th&gt; and &lt;td&gt;) are same but th
1 min read
How to Integrate Webcam using JavaScript on HTML5 ?
In this article, we will share a very simple JavaScript code snippet through which you can easily integrate your webcam into an HTML5 web page. Now, a day most of the website provides real-time webcam integration for profile picture upload or any account verification step. First, create an HTML DOM structure using the following code snippet. To int
2 min read
How to define important text using HTML5 ?
In this article, we define an important text by using the &lt;strong&gt; tag in HTML. It is the parsed tag and used to show the importance of the text. It reflects the text as bold. Syntax: &lt;strong&gt; Contents... &lt;/strong&gt; Example 1: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt; How to define important text in HTML? &lt;/t
1 min read
How to emphasize text in a document using HTML5 ?
In this article, we will emphasize the text in an HTML document by using the &lt;em&gt; element in the document. It is a phrase tag and used to emphasize the text content. Syntax: &lt;em&gt; Contents... &lt;/em&gt; Example 1: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt; Emphasize text in an HTML document &lt;/title&gt; &lt;/head
1 min read
How to Draw Graphics using Canvas in HTML5 ?
In this article, we will draw graphics by using the canvas element in the document. This tag in HTML is used to draw graphics on a web page using JavaScript. It can be used to draw paths, boxes, texts, gradient, and adding images. By default, it does not contain borders and text. Note: This tag is new in HTML5. Syntax: &lt;canvas id = "script"&gt;
1 min read
How to define a title for a document using HTML5 ?
In this article, we will define a title for the document by using the &lt;title&gt; tag. This tag in HTML is used to define the title of the HTML document. It sets the title in the browser toolbar. It provides the title for the web page when it is added to favorites. It displays the title for the page in search engine results. Syntax: &lt;title&gt;
1 min read
How to create an ordered list using HTML5 ?
In this article, we define an ordered list by using the &lt;ol&gt; tag in the document, This tag is used for ordered list, an ordered list can be numerical or alphabetical. Inside the &lt;ol&gt; tag you have to make a list li of items that will follow the order. Syntax: &lt;ol&gt; &lt;li&gt;Item1&lt;/li&gt; &lt;li&gt;Item2&lt;/li&gt; &lt;li&gt;Item
1 min read
How to add footer for a document or section using HTML5 ?
In this article, we define a footer for a document or section by using the &lt;footer&gt; tag. This tag in HTML is used to define a footer of HTML document. This section contains the footer information (author information, copyright information, carriers, etc). The &lt;footer&gt; tag is used within the body tag. The footer tag is new in the HTML5.
1 min read
How to define a form for user input using HTML5 ?
In this article, we will learn how to create a form in a webpage by using the &lt;form&gt; tag. This tag is used to create form for user input. Also there are many elements which are used within form tag. Syntax: &lt;form&gt; Form Content... &lt;/form&gt; Example: The following code snippet demonstrates the simple creation of form. &lt;!DOCTYPE htm
1 min read
How to create a caption for a figure element using HTML5 ?
In this article, you learn how to create a caption for a figure element by using the &lt;figcaption&gt; tag in the document. This new tag in the HTML5 page is used to set a caption to the figure element in a document. Syntax: &lt;figcaption&gt; Figure caption &lt;/figcaption&gt; Example: The following example demonstrates to apply caption for a HTM
1 min read
How to define style information of a document using HTML5 ?
In this Article, we define style information for a document by using the &lt;style&gt; element in the document. It is used to change our text, viewed on the page. This change includes changing font-size, font-family, font-color, etc. Not only the texts but you can also change the style of a body or part of a page. Now let us look into various attri
1 min read
How to specify the response page after submitting the form using HTML5 ?
In this article, we will specify the response page after submitting the form by using the action attribute in the &lt;form&gt; element in the document. This property is used to specify the URL page or destination of the form data that to be sent to the server after submission of the form. It can be used in the "form" element. Syntax: &lt;form actio
1 min read
How to specify that a button should be disabled using HTML5?
In this article, we specify a disabled Button by using a disabled attribute in a &lt;Button&gt; Element. A disabled button is un-clickable and unusable. It is a boolean attribute. Syntax: &lt;button disabled&gt;&lt;/button&gt; Example: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt; How to specify that a button should be disabled usin
1 min read
How to group the body content in a table using HTML5 ?
In this article, group the body content in an &lt;table&gt; element in a document. It is used to define a standard cell in an HTML table. Syntax: &lt;tbody&gt; ... &lt;/tbody&gt; Example 1: In this example, we use some HTML tags and make the group the body content in a table. C/C++ Code &amp;lt;!DOCTYPE html&amp;gt; &amp;lt;html&amp;gt; &amp;lt;hea
3 min read