I want to set the favicon for a fairly large number of pages. But, instead of using the HTML <head>
tag <link rel="shortcut icon" href="favicon.ico">
, I'd like to set it in the CSS file. I have limited access to some of the html files, and limited control to their life cycle.
A favicon is a graphic image (icon) associated with a particular Web page and/or Web site. Many recent user agents (such as graphical browsers and newsreaders) display them as a visual reminder of the Web site identity in the address bar or in tabs.
To add a favicon to your website, either save your favicon image to the root directory of your webserver, or create a folder in the root directory called images, and save your favicon image in this folder. A common name for a favicon image is "favicon.ico".
You can't set a favicon from CSS - if you want to do this explicitly you have to do it in the markup as you described.
Most browsers will, however, look for a favicon.ico
file on the root of the web site - so if you access http://example.com most browsers will look for http://example.com/favicon.ico automatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With