HTML <source> ketik Atribut
Contoh
Penggunaan atribut tipe:
<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>
Definisi dan Penggunaan
Atribut type
menentukan jenis media Internet (sebelumnya dikenal sebagai jenis MIME) dari sumber daya media.
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung atribut tersebut.
Attribute | |||||
---|---|---|---|---|---|
type | 4.0 | 9.0 | 3.5 | 4.0 | 10.5 |
Sintaksis
<source type="media_type">
Nilai Atribut
Value | Description |
---|---|
media_type | Specifies the Internet media type of the media resource. Common media types: For video:
|
tag <sumber> HTML