18 July, 2015

How to Add a Favicon to My Site


First of All What is meant by FAVICON?

            A favicon is a graphic image (icon) associated with a particular Web page and/or Web site. Many recent user agents (such as graphical browsers and newsreaders) display them as a visual reminder of the Web site identity in the address bar or in tabs.

           This document does not discuss in detail how to create a favicon image. However, the format for the image you have chosen must be 16x16 pixels or 32x32 pixels, using either 8-bit or 24-bit colors. The format of the image must be one of PNG (a W3C standard), GIF, or ICO.

Use of a rel attribute value:

           The first approach for specifying a favicon is to use the rel attribute value "icon". In this HTML 5 example, the favicon identified via the URI http://example.com/myicon.png as being a favicon:


<!DOCTYPE html>
<head>
<title>Your Website Name</title>
<link rel="icon"
type="image/png" href="http://example.com/myicon.png"> […] </head> […] </html>



The XHTML 1.0 version looks very similar:

<!DOCTYPE html>

   <head>
   <title>Your Website Name</title>
<link rel="icon" type="image/png" href="/somewhere/myicon.png" /> […] </head> […] </html>


     In above step in link tag,the href refers to the location and filename of your favicon."href="/somewhere/myicon.png"