|
|
How do I include a "favicon.ico" on my Web pages?An artist buddy of mine created a little favorites bookmark icon for my web site [they're properly called favicons or, if you want to use the name of the file, "favicon.ico" files] but I don't know how to specify on my pages that I have one of these favorites icons. Can you offer up the HTML I need? Wondering what we're talking about? Look up on the address bar of your Web browser right now and to the left of the actual URL of this page you should see a tiny little Dave icon, a nice little visual bookmark for the site that (I hope) doesn't appear on any other sites on the Web. That's my "favicon.ico" and it looks like this: If you don't know how to create one for your own Web site or blog, check out the many, many matches for a Google search for 'how to create a favicon'. :-) Now, once you have one, save it at the root level of your site, so that a URL like http://domain/favicon.ico works. Here's mine: I used to include it in my Web pages with the following code: <link rel="shortcut icon" href="/favicon.ico"></link>
but I found out that it's actually obsolete and there's a smarter, more XHTML legal and proper form, as detailed on the W3C site: <link rel="icon"
type="image/png" href="/somewhere/myicon.png" /> So to convert that to work on my site, my pages now have the following in the head: <link rel="icon"
type="image/png" href="/favicon.png" /> Note that I had to convert the ".ico" format to a more standard ".png" format for this to work, btw! Also, please note that I am actually in the middle of this transition right now, so please don't leave a comment if you want to point out that it is NOT in fact what I have on the page at this moment in time. I'll fix it ASAP and all will be well. :-) Hope that helps you out!
More Useful HTML, JavaScript and Web Site Programming Articles:
✔ How to Create Predefined Google Image Search Links?
Thanks for the Amazon URL [see Creating Amazon Search Links]. That worked beautifully. In fact, I sent you $5.00 for coffee in thanks....
✔ Can I embed a Facebook search box on my blog site?I've seen your articles about how to add a Twitter or Google search box on a Web page, but I have a tougher...
✔ Can I use CSS for drop shadows on my blog?I want to give my site a bit of a facelift and add some neat graphical elements. One of which is drop shadows....
✔ How can I embed interactive photo panoramas on my site/blog?I read through your blog entry about how to take panoramic photos with iOS 6 and an iPhone 5 and got enthused. I've...
✔ How can I create a Twitter search URL shortcut?I'd like to add a few Twitter search links to my Web site. Is that possible, or does Twitter prohibit this sort of...
Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help
right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
Categorized:
HTML, JavaScript and Web Site Programming
(Article 8886,
Written by Dave Taylor)
Tagged: bookmarks, favicon, favorites, xhtml Previous: How can I add a new user in Microsoft Windows Vista? Next: What's the most useful Mac software for college students? Reader Comments To Date: 6Jehzeel Laurente said, on May 15, 2009 10:26 AM:
You can also use the type image/vnd.microsoft.icon if you're adding a favicon in blogspot blogs. Sometimes the rel shortcut icon doesn't work :( Livio Moreno said, on May 19, 2009 11:58 PM:
I cannot make it work with IE8. sam said, on September 29, 2009 7:18 AM:
Cheers!!! Skyfish said, on March 10, 2010 8:53 AM:
Hi Dave, Downside being you can not use a png/gif here. Joseph said, on January 10, 2013 7:49 PM:
Actually on my site, I just dropped the favicon.ico file in the root directory and it gets sent to the browser automatically. I didn't have to use any HTML whatsoever.
I do have a comment, now that you mention it!Check This Out Too... |
Recent Entries
Look for Answers
Recommended
All Our Categories
Apple iPad Help
Articles and Reviews Auctions and Online Shopping Blogs and Blogging Building Web Site Traffic Business and Management Computer and Internet Basics d) None of the Above Facebook Help Google Gmail Help Google Plus Help HTML, JavaScript and Web Site Programming Industry News and Trade Shows iPhone and Cell Phone Help iPod, Sony PSP and MP3 Player Help Kindle Fire Help Mac OS X Help Pay Per Click (PPC) Advertising Pinterest Help Search Engine Optimization (SEO) Shell Script Programming Tech Support Video Help The Writing Business Twitter, LinkedIn and Social Network Help Unix and Linux Help Video Game Tips and Help Windows PC Help Find Me on Google+ ADT on G+ |
Converting ico image to png is not necessary it might however be something to consider.
From the w3c "The format for the image you have chosen must be 16x16 pixels or 32x32 pixels, using either 8-bit or 24-bit colors. The format of the image must be one of PNG (a W3C standard), GIF, or ICO."