Link to home
Create AccountLog in
Avatar of Sanjay Gandhi
Sanjay GandhiFlag for India

asked on

Favicon in Website

Hi,

I am creating a website, and giving the following line in <Head> element, after creating the favicon.ico, but my favicon is not displaying. I've tried on Chrome and Explorer.

Also some sites display a .gif as favorite icon, which I've tried but it does not work.

Code:
<link rel="shortcut icon" type="image/icon" href="Favicon.ico">

Kindly help..

Sanjay.
ASKER CERTIFIED SOLUTION
Avatar of Juan Ocasio
Juan Ocasio
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Sanjay Gandhi

ASKER

Thanks, it worked after clearing the cache.
But ./ was not required, because my icon is in root folder, where index.html is saved. Therefore the code works as:

<link rel="shortcut icon" type="image/icon" href="Favicon.ico"/>

Solved!!

Sanjay.
No problem.  Just make sure all other pages are in root if you're going to keep images/icon.

Good luck!