To add favicon on your website, you just need to add this two lines of simple code. Add this code in head section of your webpage.
After that upload this favicon.ico
and apple-touch-icon.png
file on your _img directory.
<!-- Favicons --> <link rel="apple-touch-icon" type="image/png" href="_img/apple-touch-icon.png"> <link rel="icon" type="image/x-icon" href="_img/favicon.ico">
For more Advance code only for Favicon.
<link rel="icon" type="image/x-icon" href="_img/favicon.ico" /> <link rel="icon" type="image/png" href="_img/favicon.png" /> <link rel="icon" type="image/gif" href="_img/favicon.gif" />
Some more advance code you also can use.
<!-- Opera Speed Dial Favicon --> <link rel="icon" type="image/png" href="_img/speeddial-160px.png" /> <!-- Standard Favicon --> <link rel="icon" type="image/x-icon" href="_img/favicon.ico" /> <!-- For iPhone 4 Retina display: --> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="_img/apple-touch-icon-114x114-precomposed.png"> <!-- For iPad: --> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="_img/apple-touch-icon-72x72-precomposed.png"> <!-- For iPhone: --> <link rel="apple-touch-icon-precomposed" href="_img/apple-touch-icon-57x57-precomposed.png">
To create favicon.ico
you can visit this website.
http://tools.dynamicdrive.com/favicon/
http://www.favicon.co.uk/index.php