HTML: adding a website address bar icon or favicon

Place an icon beside your address line, and make your website more professional.


It is a very simple process.
*You probably noticed the little chef’s hat on this website, this is not exactly how www.tech-recipes.com did there’s as this site includes xml for hiding such features, but this will get you started with the same results.

Create Your Icon:
First you are going to need an image:
-using your favorite photo editing program resize it to 16×16 and save it as a .bmp file.

-next open it with paint or some other basic editing software that will not try to add anything to the file as photoshop and some other high end programs do, in the transfer from .jpg and .gif to .bmp and resave it, replaceing the old .bmp file.

-now that you have a proper likely 24-bit .bmp save the file -again with paint- only save it as the following:
favicon.ico
*This name is important as it identifies it as a favorite and makes the icon appear.
*Also some browsers will automatically look for this icon to display.

-If at all possible place this icon in the root of your website (eg. the same folder as your index.html file.

Apply the Icon to Your Page:
-Between the and tags, place the following code:
<link rel="shortcut icon" href="?\favicon.ico">

*Where the ? is the address or location of your icon

In the case of your index.html file being in the same folder as your icon, the code should look similar to this:
CODE Example:
<html>
<head>
<link rel="shortcut icon" href=".\favicon.ico">
</head>
<body>
</body>
</html>

*The “.” is a reference indicating to start the path from the current folder (eg. the folder in which the .html file is located)

*A different icon can be applied to every page, or the same icon to every page.

*NOTE in IE I have noticed that it can take a few days or even weeks before the icons start to show up, if they ever do (I’m not anti-MS, but i’m not a diehard fan either), and the same glitch occurs in some versions of Mozilla as well, but Firefox users will be able to see the icons immediately.

Questions/Comments: william_a_wilson@hotmail.com
-William. § (marvin_gohan)

The Conversation

Follow the reactions below and share your own thoughts.

  • michelle

    this worked for me…not in my safari though, just the firefox…hopefully will show up in safari eventually.
    thanks

  • http://www.woodwardchiro.com Jonathan Woodward

    Thanks for the article! This is exactly what I was looking for.

  • Thomas

    Hey, it didn’t work for me in Internet Explorer. I will view my website on my friends computer, he has firefox. Hopefully it will show up evently in Internet Explorer.

    • Tobias

      It worked in: Chrome, Firefox and Opera but not in I.E. nieder did the one in this page. Thanks for posting

  • vc

    Yea, well its work in firefox for me, but it doesn’t work in IE …

  • Dane G

    Works well in fire fox but not IE

  • Ricky

    Thanks
    Thats great I m looking for this
    Nice
    again Thanks

  • Priyanku

    quick tip

    For IE to show the icon add the site to your favourites(in IE) and it will quickly adjust its cache to show the icon just like firefox.

  • Anonymous

    Thank you SO very much. Magnificent bit of work. Concise, fully-explanatory. You make the complicated so simple. Many thanks for your generosity.

  • Anonymous

    Good results, worked like a charm.
    Thank You for your work and carefully thought out instructions.
    The icon showed instantly through Google Chrome, and not with Mozilla Firefox.
    Paul in Oz

  • Anonymous

    Cool……Good stuff…thank you

    Wish there was a one stop source for all this web mastering stuff

  • http://www.generalcontractorwebsites.com contractor web design

    icons works only on firefox/mozilla. IE just can’t have it… :D

  • Anonymous

    http://www.course.lk is the best site to find the detaile about sri lanka courses

  • kshama

    thanks

  • Sbell

    Worked for me in Firefox, Crome & Safiri but not in IE8.

  • Jaimin_ce43

    hii
    actually this works for mozila and crome but doen’t work for IE…
    so what i have to do??
    please give me some idea…

  • David

    even when i favorited my website the icon didnt show up
    oh, and i cant see the chef hat

  • Aaa

    truely good

  • kanchan bansal

    Thanks.. It works great……

  • Rikker665

    does it work for a host to like http://www.webs.com

  • Msankar600

    i tried…but its not working…. please provide right information

  • http://www.facebook.com/people/Kishore-Kick/100001406717351 Kishore Kick

    in above “image location” means, it would be like “icons/ic2.png”  nothing but the address of the image. and type specifies the whether the format of the image(like png,ico,jpg etc)

  • Spider Crazy

    Hey thanks mate for the 411, dont work in IE and tried FF [test only as I cant stand FF] ONLY showed it after accepting the blocked content. As my website is covered a broad spectrum of browsers and I want to keep a professional look I think its better keeping the default logo, during the editing of my website I will keep it and if once I have finished ina few weeks its still not done I will remove it. the blue e looks better than the missing icon logo.

    SC

  • gervasio constatino

    hi!! thanks

    but doesn’t work on IE, and i cann’t see the little chef’s hat on this website too with IE, only with firefox, and with firefox work ok with you exemple.. thanks anyway

  • ramesh

    thanks i was looking for it and now i m going to upload my icon

  • dentist

    I can’t get it to work – do I save as .bmp or jpeg?

  • http://taindia.com tamil

    tamil is creat web

  • http://www.ElectronicDesignUK.com Steve

    Regardless of web browser the delay with showing your updated sites is the caching.

    In fact the more sophisticated browsers will have this like Chrome & IE. Go into settings & delete all history.

  • arunseh

    how could i make my commenting system like your website in my web site

  • يلا نتعلم

    tamil is creat web

  • nataly

    I did exactly as told, and it does not show up… I am using chrome.
    Any ideas?

    Thanks.

  • Dnyaneshwar Pote

    yes,, it’s working thank you,,,

  • J. Albert

    It worked!!! Awesome!!! :D

  • Winter MC

    Worked for me, just changed it to

  • Steve Thomson

    How do I make a custom image with letters and characters (S~W) in a box with orange background??
    Thank you!
    jsgthomson