Type Attribute


A type attribute specifies the nature of a linked file or a document. Content types are case-insensitive.

Note: type is an optional attribute.

Syntax & Example

<a href="example.png" type="file_type">

For instance, if you are going to link to a .PNG file, type attribute should read as follows

<a href="example.png" type="image/png">

Content Type Examples

Following are some of the basic content types: text/html, image/png, image/gif, video/mpeg, text/css, and audio/basic.

Additional content/media types can be found on the IANA Media Types website.

A note to our visitors

This website has updated its privacy policy in compliance with changes to European Union data protection law, for all members globally. We’ve also updated our Privacy Policy to give you more information about your rights and responsibilities with respect to your privacy and personal information. Please read this to review the updates about which cookies we use and what information we collect on our site. By continuing to use this site, you are agreeing to our updated privacy policy.