Home >Web >Website icon

Website icon (favicon)

A website icon may seem unnecessary, but it gives the whole project a very nice finishing touch. Browsers show it on the tab, in bookmarks and in the history, so it helps people find the website among the others quickly.

Originally an icon was made by drawing an image in the .gif format at a resolution of 16×16 and converting it to .ico on a website made for that.

A link to create one: realfavicongenerator.net (it creates icons in all needed formats from an image, together with the code for the head of the page)

The .ico file goes into the root of the website and this line goes between the head tags:

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

Note (as of September 2026): Today all browsers show the icon and they find the favicon.ico file in the root of the website even without a link in the head. It is usually accompanied by an icon in the SVG format, which is sharp at every size (browsers that cannot use SVG icons use the .ico), and a PNG image of 180 × 180 px, which iPhone and iPad use when the page is added to the home screen:

<link rel="icon" href="/favicon.ico" sizes="32x32">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">