HTML Guide for favicon
The type attribute value for the <link> element must be a valid MIME type, such as image/png, not favicon.
The type attribute in a <link rel="icon"> specifies the MIME type of the linked resource. MIME types must follow the standard format, such as image/png for PNG images or image/x-icon for .ico files. Using favicon is incorrect because it is not a registered MIME type, leading to validation errors.
Correct usage for linking a PNG favicon:
<link rel="icon" href="img/favicon.png" type="image/png">
Correct usage for linking an ICO favicon:
<link rel="icon" href="img/favicon.ico" type="image/x-icon">
The type attribute is optional when the server sends the correct Content-Type HTTP header, but it can be included for explicitness and clarity.