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 W’s on this website, this is not exactly how http://www.erkcm.wordpress.com did there’s as this site includes xml for hiding such features, but this will get you started with the same results.

if (!window.netshel_ord) { netshel_ord=Math.random()*10000000000000000;
}
if (!window.netshel_tile) { netshel_tile=1; }
document.write(‘<script language=”JavaScript” src=”http://ad.doubleclick.net/adj/ns.techrecipes/programming;sz=728×90;tile=’+netshel_tile+&#8217;;ord=’ + netshel_ord + ‘?” type=”text/javascript”></scr’ + ‘ipt>’);
netshel_tile++;

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: