|
How to add a FavIcon to your website?
It is very sime to add your newly created favicon to your website.
Let's you will be using your favicon for your whole website, then all you need to do is upload your favicon.ico file to the root directory on your web server. Some browsers will recognize the favicon automatically.
However, some browsers - even though they are capable of displaying favicons - won’t actually recognize them unless they are instructed to by your web page. To feed these browsers, you will need to include one of the following lines of code between those and tags and to make cover all, better do include both into your web page. :-)
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
</head>
or including the path:
<head>
<link rel="icon" href="http://www.yoursite.com/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="http://www.yoursite.com/favicon.ico" type="image/x-icon" />
</head>
The last two lines of code are defently needed if your favicon is not in the same directory as your HTML files. Then you will need to include the full path as well as the file name in the href attribute.
For example, if your HTML files are located at http://www.yoursite.com/html/ but your favicon file is in the root directory, then the href attribute needs to be like:
" href="http://www.yoursite.com/favicon.ico" or " href="/favicon.ico""
That's it! To test your new favicon in Internet Explorer, add your site to Favorites and reopen browser. To test it in Firefox or other Mozilla-based browser, open your web page and watch the address bar or the page tab.
|