문제

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"/>

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.

도움이 되었습니까?

해결책

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"/>

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

다른 팁

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).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top