HTML controls attribute

controls attribute represents the controls for media. The controls include playback, pause, volume change, resizeable, seek to arbitrary position and captions.

<video src="files/Hummingbird.mp4" height="400" width="400" controls>
</video>
</>

Attribute values

All possible values of controls attribute

controls is a boolean attribute. The boolean attribute is that attribute that has only two states.

Related Tags

The tags that support controls attribute

<video> tag

video tag embeds video in a document. controls attribute adds controls in the video such as resize frame of video, play, pause, volume change, audio tracks (if available).

<video src="files/Hummingbird.mp4" height="300" width="300" controls>
</video>
Try </>

<audio> tag

audio tag adds audio stream in a page. It also supports controls attribute.

<audio src="files/sample.mp3" height="300" width="300" controls>
</audio>
Try </>


Was this article helpful?