Click here to Skip to main content
11,432,427 members (66,265 online)
Click here to Skip to main content

Customising your website's Icon in IE5

, 27 Nov 2000 CPOL
Rate this:
Please Sign up or sign in to vote.
Replace the boring IE logo in your readers browser with an icon customised for your site.
<!-- Main HTML starts here -->

Introduction

It's always nice to differentiate your site from others, and there a couple of places in particular that allow you to make your site stand out from the crowd.

Dragging a URL from the address bar of Internet Explorer onto your desktop creates a shortcut with the familiar blue and white IE shortcut icon:

Adding a site to your favorites brings a similar result.

If your readers are viewing your site through Internet Explorer 5.0 or above then you can make your site stand out for them by simply creating a 16 x 16 pixel bitmap called favicon.ico (using the Visual Studio icon editor, for example) and placing this icon in your web site's root directory.

As soon as the user adds the site to their favorites then IE will scan that website for the favicon.ico and use it instead of the standard IE icon for desktop shortcuts, the address bar, the 'Favorites' drop down menu in IE, the shortcut bar in the taskbar (Win 98+ and Windows 2000), and in the Office Shortcut bar.

You can associate a different icon with a specific page by adding a LINK statement to the HEAD of your page:

<HEAD>
  <LINK REL="SHORTCUT ICON" HREF="http://www.mydomain.com/myicon.ico">
  <TITLE>My Title</TITLE>
</HEAD>

Click here to see the icon for Code Project.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Chris Maunder
Founder CodeProject
Canada Canada
Chris is the Co-founder, Administrator, Architect, Chief Editor and Shameless Hack who wrote and runs The Code Project. He's been programming since 1988 while pretending to be, in various guises, an astrophysicist, mathematician, physicist, hydrologist, geomorphologist, defence intelligence researcher and then, when all that got a bit rough on the nerves, a web developer. He is a Microsoft Visual C++ MVP both globally and for Canada locally.

His programming experience includes C/C++, C#, SQL, MFC, ASP, ASP.NET, and far, far too much FORTRAN. He has worked on PocketPCs, AIX mainframes, Sun workstations, and a CRAY YMP C90 behemoth but finds notebooks take up less desk space.

He dodges, he weaves, and he never gets enough sleep. He is kind to small animals.

Chris was born and bred in Australia but splits his time between Toronto and Melbourne, depending on the weather. For relaxation he is into road cycling, snowboarding, rock climbing, and storm chasing.
Follow on   Twitter   Google+   LinkedIn

Comments and Discussions

 
GeneralUseful for beginners Pin
thatraja16-Jan-10 0:26
memberthatraja16-Jan-10 0:26 
GeneralFavicon.ico not working for asp.net page?! Pin
jgilbert5-May-05 10:28
memberjgilbert5-May-05 10:28 
GeneralRe: Favicon.ico not working for asp.net page?! Pin
Maxim Langman1-Jul-07 4:58
memberMaxim Langman1-Jul-07 4:58 
GeneralRe: Favicon.ico not working for asp.net page?! Pin
tbetz18-Oct-07 6:43
membertbetz18-Oct-07 6:43 
I have been having the same issue with ASP.NET. I use master page templates and had a rough time getting it to work, until I found a blip on MSDN about how to do it. The code was almost identical to what I had seen here, but it still didn't work until...

I changed the order of the tags in the <head> area. I made it the first tag, then it magically started to work! Big Grin | :-D This is the code I used...

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

I have tried a type of image/x-icon and image/ico, and they both worked for me. The key was to have it as the first tag in the <head> area.
GeneralOther browsers Pin
yorgato3-May-05 15:46
memberyorgato3-May-05 15:46 
GeneralAuto Refresh Pin
Anonymous19-Mar-05 11:59
sussAnonymous19-Mar-05 11:59 
General.ICO Pin
[FHD]Grey_fox18-Sep-04 1:44
suss[FHD]Grey_fox18-Sep-04 1:44 
GeneralHELP ME!!! Pin
Anonymous8-Apr-04 19:15
sussAnonymous8-Apr-04 19:15 
Generalsimple but useful Pin
Anonymous15-Dec-03 1:13
sussAnonymous15-Dec-03 1:13 
GeneralWrapper for Refresh Button Pin
Anonymous6-Jun-02 14:39
memberAnonymous6-Jun-02 14:39 
GeneralRe: Wrapper for Refresh Button Pin
Anonymous9-Mar-03 5:05
sussAnonymous9-Mar-03 5:05 
GeneralRe: Wrapper for Refresh Button Pin
monicb20034-Jul-05 1:14
sussmonicb20034-Jul-05 1:14 
Generalhelp! Pin
Anonymous14-Feb-02 18:20
memberAnonymous14-Feb-02 18:20 
GeneralRe: help! Pin
Thomas Freudenberg18-Feb-02 0:46
memberThomas Freudenberg18-Feb-02 0:46 
GeneralCool!!! Pin
Nish [BusterBoy]11-Jan-02 22:01
memberNish [BusterBoy]11-Jan-02 22:01 
GeneralBleh Pin
Shaitu7-Oct-01 8:40
memberShaitu7-Oct-01 8:40 
GeneralIts different Pin
Raghu Ram25-Jun-01 23:20
memberRaghu Ram25-Jun-01 23:20 
Generalthis website Pin
Anonymous15-May-01 5:02
memberAnonymous15-May-01 5:02 
GeneralGreat tip! Pin
Anonymous21-Apr-01 13:34
memberAnonymous21-Apr-01 13:34 
General32x32 for shortcuts(large icons view) Pin
Steve Dunn5-Dec-00 0:39
memberSteve Dunn5-Dec-00 0:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150428.2 | Last Updated 28 Nov 2000
Article Copyright 2000 by Chris Maunder
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid