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>
Try </>

controls attribute value

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

Related Tags

The tags that support this attribute are as follows.

<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).


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

<audio> tag

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


<p>video is being added.</p>
<p>audio is being added.</p>
 <audio src="files/sample.mp3" height="300" width="300" controls>

Try </>

Related Pages

src attribute specifies the location of the media.

height attribute defines the vertical dimension of media.

width attribute defines the horizontal dimension of media.

The video tag adds a video in a page.

The audio tag adds an audio in a page.

Was this article helpful?




Get the newsletter