asp. net several ways to display your own web page icon

  • 2020-12-20 03:32:30
  • OfStack

If you use more than IE7, or more than tab, you will definitely find the personality icon in front of tab. How does this work

I don't quite understand it. By chance, my colleague told me several ways to do it and posted them to share with everyone

1.
Just put an ico icon in the root of your site and name it favicon.ico. favicon.ico should be 1 256 color icon for 16×16.
But not for the lower version of IE
In the web page < head > with < /head > Just add the following tags between the tags.
 
<link rel="icon" href="/youricon.ico" type="image/x-icon" /> 
<link rel="shortcut icon" href="/youricon.ico" type="image/x-icon" /> 

2.
I don't need to add any code
You put a ico directly to the root directory of the ICONS to your site, and named favicon. ico is ok, such as http: / / www abc. com, then path is http: / / www abc. com/Favorite ico
IE will search this stuff automatically

http://www.favicon.com/
http:// www. html- kit. com/favicon/ This site can convert 1-like images into ICO types

If you want to display in a browser less than IE5, it should be displayed in the HTML source file" < head > < /head > Add the following code:

< link rel="Shortcut Icon" href=" Image address" >
< link rel="Shortcut Icon" href="favicon.ico" > Replace IE's address bar with your own icon
< link rel="Bookmark" href="favicon.ico" > You can display your icon in favorites

IE6 does not display ICONS by default. ICONS are displayed only when favorites are added.

= = = = = = = = = = =

In addition, site1 written with VS2005 has been no problem for a long time, because recently IE8 appeared, I found that button of disabled still showed the original sample, thinking it was bug of IE8, but I searched for a long time

It is found that button of MS can still be disabled, so it must be Bug of the browser.

After several searches, it turned out that the version quoted by the document of W3C was too low

After the upgrade.

Here it is:
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 

Related articles: