The easiest way to add favicon is to simply put a file called favicon.ico in the root directory of your website.
Browsers will find this automatically.
You can also specify the <link> . Any of them will work:
<link rel="icon" type="image/vnd.microsoft.icon" href="http://example.com/image.ico"> <link rel="icon" type="image/png" href="http://example.com/image.png"> <link rel="icon" type="image/gif" href="http://example.com/image.gif">
Edit: I see you already knew that .: D
source share