OK..so you managed to choose an image that you'd prepared earlier
and ran it through our favicon generator and you clicked the download
link and have it saved on your computer hard drive. Well done....you're
nearly there.
Now you need to upload it to the root directory of your webspace.
Most browsers will automatically detect and use the favicon.ico file, even on pages that are written in PHP, ASP, etc.
- It has been suggested that both of the following HTML lines should be included:
<link rel="shortcut icon" href="http://3rbgame.googlepages.com/favicon.ico" type="image/vnd.microsoft.icon" />
<link rel="icon" href="http://3rbgame.googlepages.com/favicon.ico" type="image/vnd.microsoft.icon" />
(and obviously you'd replace http://3rbgame.googlepages.com/favicon.ico with your website address)
So your code could look like this:-
<head>
<link rel="icon" href="http://3rbgame.googlepages.com/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="http://3rbgame.googlepages.com/favicon.ico" type="image/x-icon" />
</head>
However, only the former is necessary, as "shortcut icon" will be
treated as a list of possibilities by standards-compliant browsers
(with "shortcut" being ignored, and "icon" used); while Internet
Explorer will treat it as a single name ("shortcut icon"). The result
is that all browsers understand the code. It is only necessary to
include a second piece of code if one desires to offer an alternative
image to modern browsers (e.g. an animated GIF).
- The link elements must be inside the head element (between <head> and </head>) in the HTML.
- For XHTML, the link element must be terminated by " />" instead of ">".
-
The href can, but need not, point to the location /favicon.ico. It
could equally well point anywhere else on your site that is convenient.
- The image can usually be in any image format
supported by the web browser, the major exception being Internet
Explorer, which only supports ICO.
- The .ico file format will be read correctly by all browsers that can display favicons.
Note:
A file called favicon.ico and located in the document root directory
will also be found by some browsers that do not process the link
elements, even if it is not linked from anywhere on your site.