0

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.

OmniOwl
  • 5,477
  • 17
  • 67
  • 116

2 Answers2

3

Why don't you want to use HTML solution?

<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="icon" href="images/favicon.ico" />
Patrick Moore
  • 13,251
  • 5
  • 38
  • 63
0

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" />
Chandrahasa Rai
  • 427
  • 1
  • 5
  • 10