HTML Audio/Video DOMcontrolsProperty
HTML Audio/Video DOM Reference Manual
Example
Enable controls for the video:
myVid=document.getElementById("video1");
myVid.controls=true;
myVid.controls=true;
Try it Yourself »
Definition and Usage
The controls attribute sets or returns whether the browser should display standard audio/video controls.
Standard audio/video controls include:
- Play
- Pause
- Progress bar
- Volume
- Fullscreen toggle (for videos)
- Subtitles (when available)
- Tracks (when available)
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the controls attribute.
Note:Internet Explorer 8 and earlier versions do not support this attribute.
Syntax
Set the controls attribute:
audio|video.controls=true|false
Return the controls attribute:
audio|video.controls
Property value
| Value | Description |
|---|---|
| true | Indicates the display control. |
| false | Default. Indicates that controls are not displayed. |
Technical Details
| Return value: | Boolean value, true|false |
|---|---|
| Default value: | false |
HTML Audio/Video DOM Reference Manualother extensions