What is a favicon?

A favicon is the small icon that represents a website in browser tabs, bookmarks and search results, set with a link element in the page head.

By · Updated

Want the full walkthrough? Read: How to make a picture square without cropping →

Explained in more detail

Favicon is short for "favorite icon". It is the tiny image beside a page title in a browser tab, in bookmarks and history, and some search engines show it next to the site name in results. It acts as a quick visual cue for the brand.

You declare it in the head of each page with a link element whose rel is "icon". The classic format is ICO, a container that can hold several sizes of the same icon so the system can pick the best fit. If a page declares several icons, the browser uses their type and sizes attributes to choose the most appropriate one. PNG icons are common, and SVG icons scale to any size from one file, but SVG favicon support is not universal (see caniuse), so keep a PNG or ICO fallback. Larger icons are used for touch devices and app shortcuts, referenced through other link types (iOS uses the non-standard apple-touch-icon) and the web app manifest.

Because favicons are displayed so small, design matters. Fine detail and thin strokes disappear at 16 pixels. Use a simple, bold shape with good contrast, and test it on both light and dark browser themes. A transparent background lets the icon sit cleanly on either, so a transparent PNG or SVG is a good source.

Favicons should be square. Starting from a non-square logo, trim it to remove empty margins and then pad it to a 1:1 canvas, so the artwork is centered and not stretched.

Exports then need resizing to each required dimension from the largest source, rather than enlarging a small one.

Related terms

Try it in Triim

Further reading

Sources

Part of the Triim image terms glossary, by Rocco Bombardieri.