HTML Favicon


Example

<link rel="icon" type="image/png" href="/favicon.png">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">

Use the mime-type image/png for PNG files and image/x-icon for icon (*.ico) files. For the difference, see this SO question.

A file named favicon.ico at the root of your website will typically be loaded and applied automatically, without the need for a <link> tag. If this file ever changes, browsers can be slow and stubborn about updating their cache.