Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Link type Property

Link type Property

Link Object Reference Link Object


Definition and Usage

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

Tip: MIME-types examples: "text/css", "text/javascript", "image/gif", etc.

Syntax

Set the type property:

linkObject.type="

MIME-type

"

Return the type property:

linkObject.type


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the type property.


Example

Example

Display the MIME-type of the linked document:

Runoob Tutorial(runoob.com)

Try it »


Link Object Reference Link Object