Export to GitHub

doctype-mirror - ATypeAttribute.wiki


You are here: Home > HTML Reference > Elements > <a> element > type attribute

Usage

This attribute is purely advisory; it does not override the content type of the target resource once the user follows the link.

<a rel="alternate" type="application/atom+xml" href="/atom.xml">subscribe</a>

Values

Must be a valid RFC 2046-compliant MIME type, with optional MIME type parameters. No default value.

Elements

You can use the type attribute on the following elements:

  • <a>
  • <area>
  • <blockquote>
  • <button>
  • <command>
  • <dir>
  • <embed>
  • <li>
  • <link>
  • <menu>
  • <object>
  • <ol>
  • <param>
  • <script>
  • <source>
  • <spacer>
  • <style>
  • <ul>

Browser compatibility

Compatibility table legend

| Test | IE8 | IE7 | IE6 | FF3 | FF2 | Saf3 | Op9 | Chrome | |:---------|:--------|:--------|:--------|:--------|:--------|:---------|:--------|:-----------| | a.type reflects <a type="text/html"> | Y | Y | Y | Y | Y | Y | Y | Y |

Further reading