Return the MIME type of a media resource:
The result of x will be:
The type property sets or returns the value of the type attribute in a <source> element.
The type attribute specifies the MIME type of the media resource.
Note: The <source> element is new in HTML5.
The type property is supported in all major browsers.
Return the type property:
Set the type property:
Value | Description |
---|---|
MIME_type | Specifies the MIME type of the media resource. Common MIME types: For video:
|
Return Value: | A String, representing the MIME type of the media resource |
---|
HTML reference: HTML <source> type attribute