Tutorial Reference # 120

Title: Address Bar Icon in HTML page
Language: HTML
Description: How to put an icon in the addres bar of your website.
Author: circuit
Added: July 23, 2007, 2:00 pm
Rating:
You need to be logged in to rate a tutorial

     



Favicon: Favorites Icon

Create a image with size 16X16 pixels and of format .ico, some browser can use .jpg or .gif formats too. Preferably create a .ico image.

We have used a gif [

] as a favicon for this page.

Upload the image file in to your directory [preferably root dir].

Use the following html code inside the <head> tag of your web page.

Example 1: Using complete path


Code:

<head>
<link rel="shortcut icon" href="http://www.cc.goje.co.uk/paul/cc.ico">
</head>




The link tag does the magic. Give the complete path of the uploaded image in href attribute.

Example 2: Using the path from the root dir


Code:

<head>
<link rel="shortcut icon" href="/paul/cc.ico">
</head>




Here we use the path beginning from the root dir. i.e if the image or icon is present under xcvxcvxcv.com/images/... the path should begin from /images/....

The address bar image also called as favicon may not work properly in IE browsers. Test it with a browser like mozilla or firefox. Create your .jpg/.gif files, it can be converted to .ico using some free online utilities.

     

Copyright 2007 © CircuitCoders.net - All Rights Reserved.