HTML and CSS Reference
Figure 11-7 The new Volume control.
Creating a Mute Button
The volume slider you just created works great, but sometimes it can be useful to have a Mute button, too. You can
mute the audio for your video by setting the muted property to true .
You should always use the muted property rather than just setting the volume to 0. That way, you do not have to
write code that remembers the volume level before you mute and retrieves that value when you unmute.
The code for this exercise can be found in folder 10.
Here are the steps for creating a Mute button: