views:

31

answers:

2

Hello!

What is the proper way to have a favicon for a website in XHTML?

1.Does it have to be .ico or can it be .gif or .png?

2.Is this the proper code for embedding and rel value:

<link rel="shortcut icon" href="http://yoursitedotcom.here/favicon.ico"/&gt;

3.Does the favicon file have to reside in the root of the site or it can be anywhere and correctly specified in the link href attribute?

4.Anything else?

Thank you.

+2  A: 

you can find a table for compatibilty of datatypes/browsers on wikipedia. the favicon can be located in a subfolder if you specify the correct path in your link-tag. and: yes, your code is ok (more about the link-tags on the wikipedia-article, too).

oezi
Thank you, oezi.
Francisc
+2  A: 

1.Does it have to be .ico or can it be .gif or .png? ya it can be gif or png too, but standard is ico

2.Is this the proper code for embedding and rel value:

<link rel="shortcut icon" href="http://yoursitedotcom.here/favicon.ico"/&gt;

this is correct

3.Does the favicon file have to reside in the root of the site or it can be anywhere and correctly specified in the link href attribute?

it can be any where as long as path is correct

4.Anything else?

google for any thing else

JapanPro
Thank you, JapanPro.
Francisc
Does "stadard is ico" mean that having a gif or such as favicon will not render properly on older browsers?
Francisc
these ico files are used in some desktop application, such as rss feed reader. in that case it may be good to practice .ico. which makes every one happy
JapanPro
Ok, thanks again.
Francisc