For the favicon, it's best for cross-browser compatibility not to use any HTML. Just name the file favicon.ico
and place it in the root of your domain. 1
An .ico
file is a container for multiple .bmp
or .png
icons of different sizes.
generate PNGs:
- non-retina: 16×16px
- retina: 32×32px
if you use Sketch you can use the this template:
https://www.dropbox.com/s/l1re5ofo2lzyxzq/favicon.sketch?dl=0
convert PNGs to .ico:
install imagemagick 2
$ convert favicon-16.png favicon-32.png favicon.ico