English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Manual de referência HTML

大全 de etiquetas HTML

HTML: <audio> propriedade controls

A propriedade controls é um atributo booleano. Se presente, especifica o modo de exibição dos controles de áudio; os controles de áudio incluem: reprodução, pausa, barra de progresso, volume

HTML <audio> tag

Exemplo online

Elemento <audio> com controles padrão do navegador:

<!DOCTYPE html>
<html>
<título>HTML: <audio> propriedade controls - site de tutoriais básicos oldtoolbag.com</título>
<body>
<audio controls>
  <source src=" cavalinho.ogg" type="áudio/ogg">
  <source src=" cavalinho.mp3" tipo="áudio/mpeg">
  Seu navegador não suporta o elemento de áudio.
</audio>
</body>
</html>
Test and see ‹/›

Browser compatibility

IEFirefoxOperaChromeSafari

Internet Explorer 9+, Firefox, Opera, Chrome, and Safari browsers support the controls attribute.

Note: Internet Explorer 8 and earlier IE versions do not support the <audio> tag.

Definition and usage

The controls attribute is a boolean attribute.

If the attribute exists, it specifies how the audio control is displayed.

Audio-video controls include:

  • Play

  • Pause

  • Progress bar

  • Volume

HTML 4.01 with HTML5differences

<audio> element is HTML5Newly added.

Differences between HTML and XHTML

In XHTML, this attribute is not allowed to be abbreviated, the controls attribute must be defined as <audio controls="controls">.

Syntax

        <audio controls>

HTML <audio> tag