Friday, April 11, 2008

Shortcut icons for web

After creating the shortcut icon for your webpage, you must associate it with your Web page. There are two methods for doing this.

The first method is to save the icon with the default file name of favicon.ico to the root directory of your domain—for example, www.microsoft.com/favicon.ico. The first time a user visits your Web page, Internet Explorer automatically searches for this file and places the icon in the address bar, next to all favorites linking to your site, and on page tabs. In Internet Explorer 5 and Internet Explorer 6, the icon will appears only after a user adds the site to the Favorites menu.

The second method for associating a shortcut icon with your Web page is to add a line of HTML code to the page's head element. The line of code includes a link tag that specifies the location and name of the icon file. You can include this link tag on a per-page basis. First, save the icon with a file name other than favicon.ico, and then add the following code to the head element of your page.

<\link rel="SHORTCUT ICON" href="http://www.mydomain.com/myicon.ico">


You can use either method, or both. However, if you use the second method, whichever icon you point to in the link tag on each page will be displayed instead of the default favicon.ico file at the root of your domain.

No comments: