Reputation:
I'm trying to add a favicon in HTML, I have seen a video about it and this code works perfectly in the video:
<html>
<header>
<link rel="icon" href="images/favicon.ico">
</header>
<body>
</body>
</html>
However, it does not work in my case:
What am I doing wrong?
You can get the files I'm using from here in case you need them (it includes the icon)
Upvotes: 0
Views: 111
Reputation: 459
It doesn't work, because in your code you wrote <header>
instead of <head>
and </header>
instead of </head>
.
It should be like this:
<html>
<head>
<link rel="icon" href="images/favicon.ico">
</head>
<body>
</body>
</html>
Upvotes: 1
Reputation: 143
I think the best way to do this by adding the icon like so
<link type="image/x-icon" href="favicon.ico" />
PS:the favicon.ico should be in the root of your project directory :)
Upvotes: 0