Tutorials References Exercises Videos Menu
Create Website Get Certified Upgrade

HTML Audio/Video DOM controls Property

❮ HTML Audio/Video DOM Reference

Example

Enable controls for a video:

var vid = document.getElementById("myVideo");
vid.controls = true;
Try it Yourself »

Definition and Usage

The controls property sets or returns whether the browser should display standard audio/video controls.

Standard audio/video controls should include:

  • Play
  • Pause
  • Seeking
  • Volume
  • Fullscreen toggle (for video)
  • Captions/Subtitles (when available)
  • Track (when available)

Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Property
controls Yes 9.0 3.5 Yes Yes

Syntax

Return the controls property:

audio|video.controls

Set the controls property:

audio|video.controls=true|false

Property Values

Value Description
true Indicates that controls are displayed
false Default. Indicates that controls are NOT displayed

Technical Details

Return Value: A Boolean, returns true if the controls are displayed, otherwise it returns false
Default Value: false

❮ HTML Audio/Video DOM Reference