Thuộc tính loại HTML <source>
Thí dụ
Sử dụng thuộc tính 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>
Định nghĩa và Cách sử dụng
Thuộc type
tính chỉ định loại phương tiện Internet (trước đây gọi là loại MIME) của tài nguyên phương tiện.
Hỗ trợ trình duyệt
Các số trong bảng chỉ định phiên bản trình duyệt đầu tiên hỗ trợ đầy đủ thuộc tính.
Attribute | |||||
---|---|---|---|---|---|
type | 4.0 | 9.0 | 3.5 | 4.0 | 10.5 |
Cú pháp
<source type="media_type">
Giá trị thuộc tính
Value | Description |
---|---|
media_type | Specifies the Internet media type of the media resource. Common media types: For video:
|
❮ Thẻ HTML <source>