rsrc/fvic.png image

How to make a fav-icon?

September 20th 2005, updated on January 30th 2009

This guide explains the term favicon, gives you hints how to make your own favicons, and tells you how to modify your internet pages to display favicon in Internet Explorer, Mozilla Firefox, Opera, and Google Chrome.

This guide is intended for people with basic knowledge about icons and HTML.

Favicon gives a web site identity

Favicon is a small image displayed by an internet browser:

rsrc/favicon-in-browser.png image
Favicon in the address bar and in a bookmarks panel of a web browser

Favicons are supported by all major web browsers. They are not a mandatory part of a web page. Web browsers will use a default icon if page lacks its own favicon, but a nice favicon gives a website identity and makes it easier to recognize and remember.

What's new in IE9 and Widnows 7

rsrc/ie9fav.png imageInternet Explorer 9 pushed the limit again and requires larger fav-icons when a site is pinned to the taskbar in Windows 7.

Creating a favicon

Favicon is just an ordinary icon with 16x16 pixels images. For best compatibility, there should be an image with 16 colors or 256 colors. Browsers are also able to use the smooth 32bit image with alpha channel. Images with larger sizes are not necessary (unless you want to target users running in high-DPI modes, but the support of that in browsers is very inconsistent) and would only make the icon file larger -> it will take longer to download, so leave them out.

You can create a favicon in any icon editor. Use either RealWorld Icon Editor, or pick up one of the other icon editors (there is a list of icon editors in our directory). If you want to create favicon without installing anything, use an online icon maker. It supports 256 colors with transparency and it can also convert pictures to icons. Once you have the icon, rename it to favicon.ico and upload it on your web server.

Assigning favicon to a page

To activate your favicon, you must modify the source of your web page. Add this line to the <head> section of your page:

<link rel="shortcut icon" href="/favicon.ico" />

Following example shows complete html of a very simple page with favicon:

<html>
<head>
<title>Title of my page</title>
<link rel="shortcut icon" href="/favicon.ico" />
</head>
<body>
My page is not empty. See?
</body>
</html>

Browser specific notes

Internet Explorer

Internet Explorer supports favicons since version 5.0. It is actually quite hard to make IE5 or IE6 show the favicon. If the icon is not showing, try one of the following:

Later versions of Internet Explorer improve support for favicons and it is not necessary anymore to add a page to your favorites to see the icon.

Mozilla Firefox, Opera, Google Chrome

These browsers support favicons flawlessly. You do not need to add a page to your bookmarks, the icon is automatically displayed in address bar and eventually in a tab heading. They will accept any file name, not just favicon.ico, hence you may assign different icon to each page on your web.

Animated favicons

Firefox allows you to use any pictures as favicons, including .gif animations. Opera can do this as well, but it does not animate the picture. If you want an animated favicon, simply create favicon.gif and use the same html code as above. If you add two lines to yout <head> section, animated favicon will be used by Firefox and the normal one by the other browsers.

<link rel="shortcut icon" href="/favicon.ico" />
<link rel="shortcut icon" href="/favicon.gif" />

Warning: animation effect may distract users. Adding an animated favicon to your page only to demonstrate that you can do it, is not always the right idea. Some users may be irritated by it.

Frequent problems and solutions

These are the typical problems and solutions related to favicons. This list is based on comments accumulated during the existence of this page. Please read them carefully before adding a new comment.

speech bubble iconRecent comments

Show older posts
user iconAnonymous on December 10th 2014 0

goood is working marius from galati RO

user iconAnonymous on December 10th 2014 0

It's not working with Internet Explorer. 😞

user iconAnonymous on December 13th 2014 0

how can i add image icon on my HTML? 😮

user iconAnonymous on January 11th 2015 0

how can i remove the google image from my browser title?

user iconAnonymous on February 5th 2015 0

i didn't get result for adding favicon why?

user iconAnonymous on August 29th 2015 0

why do they call it a favicon?

user iconAnonymous on January 25th 2016 0

its not showing on google chrome with me tho

user iconAnonymous on December 15th 2022 0

Nie działa z google hrome 😞

user iconjaniu1402 on September 5th 2024 0

wlasnie Nie działa z Googla 😞 icon-image/7284-16x16x32.png image icon-image/26357-16x16x32.png image icon-image/26357-16x16x32.png image icon-image/7284-16x16x32.png image

user iconRIDDLER on December 13th 2024 0

Favicons can be made in RealWorld Icon Editor as well.

user icon