Home > Article > Web Front-end > Web page favorites display ICO icon (less code)_Basic knowledge
After adding a webpage to your favorites, you will see a beautiful icon. I am curious how it is achieved? In fact, the implementation of the code is very simple. Just add a sentence to the web page code. However, sometimes there is compatibility with IE6/IE7/other browsers. The code in the code box below is the code of IE6/IE7. After testing, it was found that Select IE7 code to achieve compatibility.
Note: Store the ICO icon in the root directory or other secondary column directories in advance. Also pay attention to the path when calling. Only relative paths are allowed.
<title>让你的网页收藏夹显示ICO图标</title> <!--FOR IE7--> <link rel="shortcut icon" href="/favicon.ico" /> <!--FOR IE6--> <link rel="icon" href="/favicon.ico" type="image/x-icon" />
Note that it will take some time to take effect.
The above code is relatively small, and you can display the ICO icon in your web favorites. I hope you like it.