X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Link type Property

Link Object Reference Link Object

Example

Return the MIME-type of the linked document:

var x = document.getElementById("myLink").type;

The result of x will be:

text/css

Try it yourself »


Definition and Usage

The type property sets or returns the content type (MIME type) of the linked document.

Tip: Examples of MIME-types are: "text/css", "text/javascript", "image/gif", etc.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The type property is supported in all major browsers.


Syntax

Return the type property:

linkObject.type

Set the type property:

linkObject.type=MIME-type

Property Values

Value Description
MIME-type The MIME type of the linked document.
Look at IANA MIME types for a complete list of standard MIME types

Technical Details

Return Value: A String, representing the content type of the linked document


Link Object Reference Link Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook