Return the MIME type of a specific link:
The result of x will be:
The type property sets or returns the value of the type attribute of a link.
The type attribute specifies the MIME type of the target URL in the area.
Note: The type attribute is purely advisory.
Note: The type attribute is new for the <a> element 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 linked document. Look at IANA MIME types for a complete list of standard MIME types. |
Return Value: | A String, representing the MIME type of the linked document |
---|
Set the type attribute of a link to text/html:
HTML reference: HTML <a> type attribute