How to modify the small icons of the web page and the icons on the browser page.

1. Modify the small icon on the browser page.

Create a 16*16 icon named favicon.ico and place it in the project images directory (it can be converted into ico format through Baidu "ico Online Production")

 

2. Insert code between the <head>...</head> tags on the first page of the HTML page:

<link rel="icon" href="img/ico.ico" type="image/x-icon" />
<link rel="shortcut icon" href="img/ico.ico" type="image/x-icon" />
<link rel="bookmark" href="img/ico.ico" type="image/x-icon" />

There are two values ​​in rel, one is shortcut icon and the other is icon.

shortcut icon, specifically refers to the icon displayed on the left side of the address in the browser. The general size is 16*16 and the suffix is ​​.ico;

icon, the available formats are PNG\GIF\JPEG, and the sizes are generally 16*16, 24*24, and 36*36.

 

3. Refresh the page and clear the cache.

Guess you like

Origin blog.csdn.net/YiMiMMMi/article/details/103853287