In a HTML5 document, which favicon format do you recommend and why? I want it to be supported by IE7 and all the modern browsers.
Also, when using .png, do I need to specify the type (type="image/png")?
For compatibility with all browsers stick with .ico
.
.png is getting more and more support though as it is easier to create using multiple programs.
for .ico
<link rel="shortcut icon" href="http://example.com/myicon.ico" />
for .png, you need to specify the type
<link rel="icon" type="image/png" href="http://example.com/image.png" />