HTML Favicon Icon

Preview

Favicons appear in the browser tab, bookmarks, or address bar. Below are examples:

32x32 Favicon 16x16 Favicon

Tip: Refresh this page and check the browser tab to see the favicon.

Example Code

<link rel="icon" type="image/png" href="favicon-32.png" sizes="32x32">
<link rel="icon" type="image/png" href="favicon-16.png" sizes="16x16">

Tag & Attribute Reference

<link>

Defines a relationship between the document and an external resource. For favicons, it links the icon file to the page.

rel

Specifies the relationship type. Use icon for favicons, or shortcut icon for legacy support.

type

Defines the MIME type of the icon. Common values: image/png, image/x-icon, or image/svg+xml.

href

Points to the favicon file (local path or external URL).

sizes

Specifies icon dimensions (e.g. 16x16, 32x32). Browsers use this to pick the best size.