52

How do I set a little icon next to the website title on tabs in the web browser?

Cory Petosky
  • 12,458
  • 3
  • 39
  • 44
ozsenegal
  • 4,055
  • 12
  • 49
  • 64
  • 6
    How can this be marked as duplicate if it preceded "How to add a browser tab icon (favicon) for a website" by almost a year? – Dov Miller Jul 20 '16 at 09:44

2 Answers2

101

It's called a Favicon, have a read.

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

You can use this neat tool to generate cross-browser compatible Favicons.

Cory Petosky
  • 12,458
  • 3
  • 39
  • 44
  • 4
    I would only add, here's a nice online tool to generate crossbrowser compatible favicons based on existing bmp/png/gif/jpeg images: http://tools.dynamicdrive.com/favicon/ The site at its own also contains good additional background information. – BalusC Mar 02 '10 at 00:39
9
<link rel="SHORTCUT ICON" href="favicon.ico" type="image/x-icon" />
<link rel="ICON" href="favicon.ico" type="image/ico" />

Excellent tool for cross-browser favicon - http://www.convertico.com/

mathewsun
  • 373
  • 6
  • 14