Of course the first step is to create a favorite icon. For most browsers (like safari) you can just through in a jpeg of any size, and it will work. But, the ever-popular ie (internet explorer) has very strict rules for what kind of image you can use. To make this very picky browser happy, you must convert your image to .ico and it must be 16x16. A program I have found to be helpful is Icon Editor, this program will convert any .bmp image into .ico format, it will also resize it for you.
Now that you have your icon ready, you need to use it on your webpage. You will need to upload your icon to the root directory on your server. Name the file “favicon.ico,” this will make all of the pages on your site have that icon placed next to the address bar, just like Google! Now, if you don’t want to clutter up your root directory with a favorite icon, you will need to put this code in between the <head> and </head> elements on every page on your site:
<link rel="shortcut icon" type="image/ico" href="http://www.domain.com/the/root/to/the/icon/file/favicon.ico">
I hope that makes sense. Any comments or questions would be appreciated.