Reputation: 5709
How do I add an icon to the browsers tab through CSS?
I tried to do this:
head
{
icon: 'images/favicon.ico';
}
But it says that it can't resolve the reference. Then I looked around on stackoverflow and other places, and I keep finding what appears to be HTML solutions and not just CSS solutions, unless that's impossible of course.
Upvotes: 0
Views: 5630
Reputation: 457
CSS stylesheet not supporting to change favicon iamge inside tab
Add the below code inside head tag. .ico or .png image extension also support.
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
Upvotes: 0
Reputation: 13344
Why don't you want to use HTML solution?
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="icon" href="images/favicon.ico" />
Upvotes: 3