Can i add an favicon for my website ?

Status
Not open for further replies.

ah-blabla

New Member
Messages
375
Reaction score
7
Points
0
You can add a favicon by adding a file named favicon.ico in the root directory of your website, or by adding the correct tags in the head section of an html page. Read here for details.

And example using the code in head: (This is the preferred method according to w3.)
Code:
 <link rel="shortcut icon" href="http://www.ahunt.org/favicon.png" />
-> the href attribute points to the location of the favicon, which should be 16x16, 32x32 or 64x64 image, of format ico, png, jpeg, gif.
 

ppeterpp

New Member
Messages
16
Reaction score
0
Points
0
<link rel="shortcut icon" href="http://www.ahunt.org/favicon.ico" />
What i use
 

adamparkzer

On Extended Leave
Messages
3,745
Reaction score
81
Points
0
<link rel="shortcut icon" href="http://www.ahunt.org/favicon.ico" />
What i use

If you have a file named favicon.ico already in your root directory, I believe you do not have to add any additional lines of code to your pages.
 

Jarryd

Community Advocate
Community Support
Messages
5,534
Reaction score
43
Points
48
This is correct, placing the favicon.ico file inside your root directory will automatically show up on all pages, posting the correct code in the head of a html page would mainly be used if you were using different favicons for different pages i guess.
 

ah-blabla

New Member
Messages
375
Reaction score
7
Points
0
This is correct, placing the favicon.ico file inside your root directory will automatically show up on all pages, posting the correct code in the head of a html page would mainly be used if you were using different favicons for different pages i guess.
It works, but is discouraged:
Method 2 (Discouraged): Putting the favicon at a predefined URI
[...]
This method works because some browsers have been programmed to look for favicons using that URI. This approach is inconsistent with some principles of Web architecture and is being discussed by W3C's Technical Architecture Group (TAG) as their issue siteData-36.
(From http://www.w3.org/2005/10/howto-favicon)
 
Status
Not open for further replies.
Top