Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

Bad value “X” for attribute “type” on element “a”: Subtype missing.

The type attribute on <a> elements, when present, gives a hint on the MIME type of the linked resource, for example:

<a href="application/pdf" src="book.pdf">Read our book</a>
<a href="image/jpeg" src="photo.jpeg">See a photo</a>

That is, we’re talking about the type of the linked resource, not the type of the <a> element, as it’s sometimes misunderstood. The following example is invalid because button is not a valid MIME type.

<a href="/order.php" type="button">Submit</a>

Learn more:

Related W3C validator issues