Easy Tutorial
❮ Dom Obj Datalist Prop Canvas Globalcompositeoperation ❯

Audio controls Attribute

Audio Object

Example

Enable controls for audio:


Definition and Usage

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

This attribute reflects the <audio> controls attribute.

If the attribute is present, it specifies how the audio controls should be displayed.

Audio/video controls include:

Note: The <audio> element is new in HTML5.


Browser Support

All major browsers support the controls attribute.

Note: Internet Explorer 8 or earlier does not support the <audio> attribute.


Syntax

Return the controls attribute:

Set the controls attribute:

Attribute Values

Value Description
true false Specifies whether the audio should display controls. true - Specifies to display controls.<br> false - Default. Specifies not to display controls.

Technical Details

Return Value: Boolean, returns true if the audio is set to display controls, otherwise returns false.
Default Value: false
--- ---

More Examples

Example

Check if audio controls are displayed:


Related Articles

HTML Reference: HTML <audio> controls Attribute


❮ Dom Obj Datalist Prop Canvas Globalcompositeoperation ❯