"G. Doucet" <> wrote:
>I am running win98 with IE6.0
>I have seen a few sites that have a shortcut icon.
If you are using IE then you will only have seen icons after you have
added the site in question to your favorites.Some other browsers will
display it straight away.
>Their icon displays both in the address bar and in the favorite list.
>Examples:
> Google: http://www.google.ca/
> WDG: http://www.htmlhelp.com/reference/html40/
>
>I am trying to add a shortcut icon on my own site.
>I have read the following articles:
> http://www.cursorarts.com/ca_faqif.html#02
> http://allmyfaqs.com/faq.pl?Little_p...e_location_bar
>
>One site has the type="image/x-icon" while the other doesn't?
As an attribute of the <link> element, right? It's correct and does no
harm, but whether it does any good is doubtful.
>Funny thing is the source of Google or WDK don't even appear to specify an
>icon.
They don't need to, nor do you. When you add a site to your favorites
list in IE it automatically asks the server for favicon.ico. Using the
<link> code in your HTML means that (a) you can call your icon
something other favicon.ico, (b) you can place it anywhere you like,
not just in the site root and (c) other browsers can also display the
icon (though Opera has an option to _always_ ask for an icon, which
results in even more 404s than IE's behaviour).
>I have tried and tried but I still can't get my icon to show.
>This is the begining of my HTML file as it is now:
>
> <HTML>
> <HEAD>
> <LINK rel="shortcut icon" href="favicon.ico" type="image/x-icon">
> <LINK rel="icon" href="favicon.ico" type="image/x-icon">
> </HEAD>
Having both versions shouldn't cause any harm, but it might.
BTW, technically
<LINK rel="shortcut icon" href="favicon.ico" type="image/x-icon">
is the same as
<LINK rel="icon shortcut" href="favicon.ico" type="image/x-icon">
and the same as
<LINK rel="icon" href="favicon.ico" type="image/x-icon">
<LINK rel="shortcut icon" href="favicon.ico" type="image/x-icon">
But IE doesn't treat all versions equally. Best to stick to just
rel="shortcut con"
> <BODY bgcolor=76A9C7 alink=0000FF link=0000FF vlink=0000FF topmargin=0
>leftmargin=5 rightmargin=5 bottommargin=0>
> <CENTER>
Ouch. What's all that mid-1990s crud doing there? It's 2004, time to
learn about the benefits of CSS.
>By the way, I am starting to notice that HTML documents now begin with
>something like:
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
>Do I need one of those lines? Could that be what I'm missing?
Not if you're writing HTML like the above snippet, when you start
writing valid HTML you will want to include a doctype to state which
version of HTML you are writing. Some browsers do behave differently
depending on which doctype is specified but that has no bearing on the
display of icons.
>Last thing, Is it possible that I've seen a shortcut icon in the title bar?
Not as far as I know.
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <> <http://steve.pugh.net/>