Easy Tutorial
❮ Prop Progress Max Prop Canvas Shadowcolor ❯

Anchor type Attribute


Definition and Usage

The type attribute sets or returns the MIME type of the linked resource.

The type attribute describes the MIME type of the linked document.

Syntax

Set the type attribute:

Return the type attribute:

Value Description
MIME-type Describes the MIME type of the linked document. For more information about MIME types, see IANA MIME types

Browser Support

All major browsers support the type attribute.


Example

The following example returns the MIME type of the linked resource:

<p><a id="tutorialpro" type="text/html" href="//www.tutorialpro.org">tutorialpro.org</a></p>
<script>
document.write("Return the type attribute value of the link: ");
document.write(document.getElementById("tutorialpro").type);
</script>

The output of the above example is:

text/html

❮ Prop Progress Max Prop Canvas Shadowcolor ❯