tags:

views:

31

answers:

4

I made a windows icon (*.ico) and named it favicon, it is 16 by 16 and with 16 colors... I have included it with the link tag

but it does not load right

how do I add a favicon to a website in xhtml

I tried everything on the web but it still does not work

how do I do it

+1  A: 

Upload the .ico to your root directory and add this in your XHTML header:

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">

The favicon may not appear right away. Depending on what browser you're using, you may need to clear your cache or even bookmark the website.

Tyler
Just want to confirm that if browsers has detected that there aren't a favicon, they make an effort to not ask for it again.
some
+1  A: 

Add the following markup to your html's head:

<link rel="shortcut icon" href="http://www.example.com/myicon.ico"&gt;

http://en.wikipedia.org/wiki/Favicon

dvcolgan
+3  A: 

You do it like this:

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
Robert Massaioli
A: 

you may place the ico in your root directory and add code like this line

<link rel="shortcut icon" href="/favicon.ico" />
lioncin