Tips for adding favicon to a website: a small icon in front of the URL

Tips for adding favicon to a website: a small icon in front of the URL
The so-called favicon, which is the abbreviation of Favorites Icon, is called website avatar in Chinese. As the name suggests, it can distinguish different websites by icons in addition to displaying the corresponding titles in the browser's favorites. Of course, this is not all there is to Favicon. Favicon display varies depending on the browser: in most mainstream browsers such as FireFox and Internet Explorer (5.5 and above), favicon is not only displayed in the favorites, but also appears in the address bar. Users can then drag the favicon to the desktop to create a shortcut to the website. In addition, tabbed browsers even have a lot of extended functions, such as FireFox even supports favicons in animated formats.

Just add the following code between <head></head>

Copy code
The code is as follows:

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

Note: The purpose of the first and third lines of code: The icon is also displayed under the favorites, whether it is the Explorer window or the browser's favorites.

<<:  Vue3.0 handwritten carousel effect

>>:  You really need to understand the use of CSS variables var()

Recommend

Native js realizes the drag and drop of the nine-square grid

Use native JS to write a nine-square grid to achi...

How to implement n-grid layout in CSS

Common application scenarios The interfaces of cu...

Detailed explanation of scheduled tasks for ordinary users in Linux

Preface Ordinary users define crontab scheduled t...

Record of the actual process of packaging and deployment of Vue project

Table of contents Preface 1. Preparation - Server...

How to use html2canvas to convert HTML code into images

Convert code to image using html2canvas is a very...

Steps to run ASP.NET Core in Docker container

There are too much knowledge to learn recently, a...

Vue implements an example of pulling down and scrolling to load data

Table of contents Step 1: Installation Step 2: Ci...

How to install and deploy ftp image server in linux

Refer to the tutorial on setting up FTP server in...

How to use stored procedures in MySQL to quickly generate 1 million records

Preface When testing, in order to test the projec...

VMware kali virtual machine environment configuration method

1|0 Compile the kernel (1) Run the uname -r comma...

Gitlab practical tutorial uses git config for related configuration operations

This article introduces the content related to gi...