![]() |
VOOZH | about |
The HTML controls attribute is used with media elements such as <audio> and <video> to display built-in playback controls. It allows users to play, pause, adjust volume, and interact with the media directly.
Syntax:
<element controls> Below example illustrates the use of controls attribute in <audio> element.
Example: Use the <audio> element with controls and autoplay attributes to play an audio file. It includes multiple <source> elements for different audio formats.
Example: Use the <video> element with controls to embed a video player. It includes <source> elements for multiple video formats, ensuring compatibility across different browsers.