PDA

View Full Version : ICON for webpage!!!



gkp.gaurav
March 28th, 2007, 05:54 AM
hi buddies
can someone plz tell me that how can i add an icon to my web page!!! .... when i open kirupa, an "orange" icon appears in the browser's address bar. what is this, and how can we make this?

duncanhall
March 28th, 2007, 06:07 AM
They're known as 'favicons' as they are the Icons that appear in the Favourties list of your browser. See here for more:

http://www.favicon.com

foodpk
March 28th, 2007, 06:09 AM
Make an icon that's 16x16 in size and name it favicon.ico
Put it in the folder where your site is and add this piece of code in the head section of your document.

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
If you don't know how to make a .ico file, just draw something and save it as a .gif or .png and then convert it using this page http://www.chami.com/html-kit/services/favicon/

noTime
March 28th, 2007, 06:14 AM
There's no need to make .ico file - GIF and PNG work great too.

gkp.gaurav
March 28th, 2007, 06:20 AM
ok, thanks. but cant i test this on my local machine?

gkp.gaurav
March 28th, 2007, 06:22 AM
There's no need to make .ico file - GIF and PNG work great too.


and name "favicon" is must?

noTime
March 28th, 2007, 06:30 AM
No, there's no such thing as must in HREF attributes.

evildrummer
March 28th, 2007, 12:25 PM
you guys are mixing things, if you name a .ico favicon.ico and put it in your servers root directory then all pages will get the icon even if you dont insert the favicon code, however if you use the code

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
then it CAN be named something else but its always better to name it favicon.ico as a backup method.

foodpk
March 28th, 2007, 01:31 PM
Yeah, it doesn't hurt to name it favicon.ico AND add the link tag.

evildrummer
March 28th, 2007, 02:00 PM
^ best method as some browsers only support one and not the other,