Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am making a HTML page that is unpublished and that I just started. The first thing I wanted to do was add a favicon to appear next to the title. I'm using google chrome and I noticed that other websites have favicons that appear next to the title in the browser, but mine wont show up. I'm new to favicons. The site is in a folder on my desktop named site. This is the code:

<!DOCTYPE html>
<html> 
    <head>
        <title></title>
        <link rel="shortcut icon" href="favicon.ico" />
    </head>
    <body>
    </body>
</html>
share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

If I understood you well, your website isn't in a webserver in your computer ? If you are accessing your site with something like this file:///C:/Users/Me/Desktop/mysite.html, you are not in a webserver and gonna need one to access your site with something like this http://localhost/mysite.html.

The reason why is because Chrome seams to have problems with loading favicon files when your site isn't in a webserver environment(Don't ask me why, I really don't know). I've just tester your page in my desktop on Chrome and it dosen't work, after that I've tested on my localhost webserver and it works.

If you are not familiar with webservers, I would suggest this one if you are on windows WAMP server.. There should be infos there about how to install it(it's actually pretty easy). After that you gonna be able to put your website's files in the webserver's "public html folder" (C:/wamp/www/ in this case) and access your website with http://localhost/

Good luck :)

share|improve this answer
    
Thanks, I tested it in Firefox and it worked. –  Nick Dec 9 '12 at 16:56
add comment
<link href="favicon.ico" rel="shortcut icon" />

Try this.

Also make sure it is pointing to the right location, and that the icon file can also be displayed in other browsers.

If it also does not display in other browser, you probably don't have a valid .ico file or your pointing to the wrong location.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.