HTML- Attribut vom Typ <Quelle>
Beispiel
Verwendung des type-Attributs:
<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>
Definition und Verwendung
Das type
Attribut gibt den Internet-Medientyp (früher bekannt als MIME-Typ) der Medienressource an.
Browser-Unterstützung
Die Zahlen in der Tabelle geben die erste Browserversion an, die das Attribut vollständig unterstützt.
Attribute | |||||
---|---|---|---|---|---|
type | 4.0 | 9.0 | 3.5 | 4.0 | 10.5 |
Syntax
<source type="media_type">
Attributwerte
Value | Description |
---|---|
media_type | Specifies the Internet media type of the media resource. Common media types: For video:
|
❮ HTML-<source>-Tag