HTML <sorgente> tipo Attributo

❮ Tag HTML <sorgente>

Esempio

Utilizzo dell'attributo type:

<audio controls>
  <source src="horse.ogg" type="audio/ogg">
  <source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>

Definizione e utilizzo

L' typeattributo specifica il tipo di supporto Internet (precedentemente noto come tipo MIME) della risorsa multimediale.


Supporto browser

I numeri nella tabella specificano la prima versione del browser che supporta completamente l'attributo.

Attribute
type 4.0 9.0 3.5 4.0 10.5

Sintassi

<source type="media_type">

Valori di attributo

Value Description
media_type Specifies the Internet media type of the media resource.

Common media types:
For video:
  • video/ogg
  • video/mp4
  • video/webm
For audio:
  • audio/ogg
  • audio/mpeg
Look at IANA Media Types for a complete list of standard media types

❮ Tag HTML <sorgente>