title: When referencing favicons, is MIME-type declaration (using the type attribute) obligatory?
body: <p>When referencing a <code>&lt;link rel=&quot;icon&quot;&gt;</code> in the <code>&lt;head&gt;</code> of an HTML document, is it obligatory to declare the <strong>MIME Type</strong> of the icon image using the attribute <code>type=&quot;[MIME TYPE HERE]&quot;</code>?</p>
  <p>Or is the <code>type</code> attribute optional?</p>
  <p><strong>E.g.</strong></p>
  <p>Is it compulsory to write:</p>
  <pre><code>&lt;link rel=&quot;icon&quot; href=&quot;/path/to/my/favicon.png&quot; sizes=&quot;57x57&quot; type=&quot;image/png&quot;&gt;
  &lt;link rel=&quot;icon&quot; href=&quot;/path/to/my/favicon.svg&quot; type=&quot;image/svg+xml&quot;&gt;
  </code></pre>
  <p>Or is still valid to write:</p>
  <pre><code>&lt;link rel=&quot;icon&quot; href=&quot;/path/to/my/favicon.png&quot; sizes=&quot;57x57&quot;&gt;
  &lt;link rel=&quot;icon&quot; href=&quot;/path/to/my/favicon.svg&quot;&gt;
  </code></pre>
  <hr />
  <p><strong>My reason for asking this question:</strong></p>
  <p>Today, on the subject of favicons, I read:</p>
  <blockquote>
  <p>The main favicon can be an SVG of any size. The type
  <code>type=&quot;image/svg+xml&quot;</code> is unnecessary.</p>
  <p><strong>Source:</strong> <a href="https://medium.com/swlh/are-you-using-svg-favicons-yet-a-guide-for-modern-browsers-836a6aace3df" rel="nofollow noreferrer">https://medium.com/swlh/are-you-using-svg-favicons-yet-a-guide-for-modern-browsers-836a6aace3df</a></p>
  </blockquote>
  <p>I don't feel entirely uncomfortable omitting the <code>type</code> but if I can confirm from an official source that it's definitely <strong>not necessary</strong> then I'm willing to try getting used to not including it in future.</p>