HTML controls attribute

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

Example

<video src="files/Hummingbird.mp4" height="400" width="400" controls>
 </video>
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).

Example

<p>video is being added.</p>
 <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.

Example

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

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?

 

Email:

Message:

Get the newsletter