Email
Share

We Rock Your Web Forum » Markup Languages » HTML

How to add a Favicon?

(4 posts)
  1. asterix

    member
    Joined: Aug '09
    Posts: 19

    How do I add the little favicon icon you see as the little graphical logo in browser tabs to a web page?

    Posted 2 years ago #

  2. Posted 2 years ago
  3. cwd

    senior admin
    Joined: Jul '09
    Posts: 225

    Simply add the following into the header portion of your web page:

    <link rel="shortcut icon" href="http://forum.contractwebdevelopment.com/favicon.ico" type="image/x-icon" />

    Notice how this example illustrates the location of our own favicon. We simply uploaded our favicon.ico file into our root directory, however the location may differ for your setup and you may need to update the above line accordingly.

    Posted 2 years ago #
  4. asterix

    member
    Joined: Aug '09
    Posts: 19

    Sweet - that works. I'm assuming this applies to any web page? What if I have a static site - do I need to add this to every page or only the index page?

    Finally, would you mind sharing how I actually make a favicon (ie. using graphics software)?

    Posted 2 years ago #
  5. cwd

    senior admin
    Joined: Jul '09
    Posts: 225

    Right - add that to the header of all web pages you want to have a favicon. It might be easier to use an include if you're applying this to multiple static pages.

    As for making a favicon - you'll simply need to use graphics software (such as Photoshop or the open source and free GIMP) that supports saving in the ICO (.ico) format. That's the file format of your favicon. Then upload the .ico file (you can name it anything - it doesn't have to be favicon.ico) to your web server and reference it in the header of your web page files as explained above.

    Posted 2 years ago #

RSS feed for this topic

Reply

(required)

Allowed markup: BBcode blockquote code em strong ul ol li font strike center u hr.
You can also put code in between backtick ( ` ) characters.