What markup is the modern standard for adding a favicon to my site? What is the standard image format and size?
|
migrated from stackoverflow.com Dec 5 '10 at 10:08
|
To work in all browsers, Also not in your question, they should be 8 or 24bit color depth. It may be worth noting, if you plan on iWhatever users bookmarking your site, that's a separate
Which is: |
|||
|
|
|
|
|||||
|
|
You can use a tool like http://www.favicon.cc/ to importe a picture and convert it into a favicon, or just create it from scratch. After that, if you name your file But you can also explicitly declare it in your html files like this:
With the advantages to use other format than |
|||
|
|
|
Markup with full domain http path for IE and keep favicon in document folder:
Standard image format:
|
|||
|
|
|
You don't need a link anymore, but it's useful. Instead, so long as you leave the file named favicon.ico (and it's an ico) in your root, it'll be used as the favicon. |
|||
|
|
|
I had a little trouble creating my .ico file with the GIMP, but this post gives detailed instructions. The trick appears to be saving as GIF format first to convert to an indexed colour table, and then convert that to ICO format. |
|||
|
|