Ask

How can I put favicon to my website?

February 22, 2011 - 07:54:01
Hello,

I would like to add favicon to my website, how can I do this?
ASKED BY
Sezgin Riggs

1 Answer

Sezgin Riggs
October 23, 2010 - 15:38:54
I solved that and writing my answer here fellas...

First of all, you have to create your icon image. Your image file must be 16x16 pixels or 32x32 pixels, and 8-bit or 24-bit colors. The format of the image must be PNG, GIF or ICO. As PNG is a W3C standard for a long time, preferably it should be PNG. If you don't want to waste your time with creating icon, you should search google for "favicon generator" and you will find many online favicon generators.

After creating your icon, you can add it to your site with these two methods;
1- (Preffered) Use of these rel attribute in between <head>..</head> tags
<link rel="icon" href="http://www.answerpack.com/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="http://www.answerpack.com/favicon.ico" type="image/x-icon" />

Don't forget to replace URL with your site's icon url.

2- Predefined URL
If you put your icon under your site's root directory with "favicon.gif", "favicon.png" or "favicon.ico" name, browsers will automatically find and show it.

That's all, hope it helps :)
Please Sign up or Login to answer questions