Favicon HTML Code

Branding plays a vital role in web design. Using favicon helps to established a good feel and brand of your website.

What is favicon?

html code to create favicon

A favicon literally means favorite icon. This icon is saved on your computer when you add websites to your favorites or bookmark. Nowadays, this also serves as the identity of a website in the smallest version.

Where can I get a favicon?

There are various favicon generator out there. I use www.html-kit.com/favicon/. It works perfectly by uploading an image or a graphic.

HTML Code for Favicon

Place the HTML code inside the <head></head> tag.

.ico favicon

.gif favicon

combination of .ico and .gif

Common Problems

Note: Favicon don’t work on IE 6. It works when you bookmark the site.

12 responses to “Favicon HTML Code”

  1. mqm says:

    i wanna know for normal use we use .ico or .gif?

    • Cameron says:

      The web standard is .ico

      The only real reason to use a .gif is to have an animated favicon, or if you are unfamiliar with how to create .ico files.

  2. Mike says:

    I was able to get a favicon to function on Internet Explorer, and Google Chrome, but it won’t function on Firefox.

  3. fred says:


    I have coded

    for a favicon (not an animated favicon), which used to be correct.

    I just checked my source code in an online HTML checker and it has come up as an error – it now says:

    The “rel” value specifies the following unrecognized link type: “shortcut”.

    Is the check wrong or has the coding changed?


  4. Aoi says:

    i have a similar problem to Mike.. but this time.. it only works on Firefox but not in Chrome, IE, and Torch as well..can you please tell me what’s wrong.? i already cleared the cache of the said 3…but still it doesn’t work..thank you 🙂

  5. Atif says:

    I can’t set favicon , please help me

  6. madie says:

    can’t create the Favicon please help.

Leave a Reply

Your email address will not be published. Required fields are marked *