Add Favicon to site using Html



A Favicon is a graphic image associated with a particular Webpage and/or Website displayed by browser:
  • in the address box,
  • in the Favorites (Bookmarks) pane and menu,
  • modern browsers also display them in tabs,
  • and there is also an extension for Firefox, which displays favicons on Google search pages.
You can create a favicon in any icon editor. It should be 16×16 in size. Once you have the icon ready, rename it to favicon.ico and upload it to your Server root folder.


Assigning favicon to a page :- 

To activate your favicon, you must modify the source of your web page. Add this line to the <head> section of your page:

<link rel="shortcut icon" type="image/png" href="favicon.png" />
or
<link rel="shortcut icon" type="image/ico" href="favicon.ico" />

 Following example shows complete html of a very simple page with favicon:

<html>
<head>
<title>Title of my page</title>
<link rel="shortcut icon" type="image/png" href="favicon.png" />
</head>
<body>
Example to show use of Favicon.
</body>
</html>

Note: Simply changing the filename extension of an image to .ico without converting it to an ICO file will result in an error and not displaying the favicon.

0 comments :