Search code examples
htmlcssfavicon

Adding favicon in website


Is there anyway to add favicon [GIF & ICO] through CSS or I need to add the tag in every HTML pages ?


Solution

  • The favicon can not be defined in CSS. If you want reliable behaviour, you should use the HTML tags.

    Browsers will usually automatically look at /favicon.ico if an icon isn't defined in HTML. Putting an .ico file here will work in all browsers, but this won't work for other file types.