Link type attribute
Definition and Usage
type
Sets or returns the content type (MIME type) of the linked document.
Tip:Examples of MIME types include: "text/css", "text/javascript", "image/gif", etc.
See also:
HTML Reference Manual:HTML <link> type Attribute
HTML Reference Manual:HTML <link> Tag
Example
Return the MIME type of the linked document:
var x = document.getElementById("myLink").type;
Syntax
Return type attribute:
linkObject.type
Set type attribute:
linkObject.type = MIME-type
Attribute Value
Value | Description |
---|---|
MIME-type |
|
Technical Details
Return Value: | A string value representing the content type of the linked document. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |