There is no standard way to add a favicon in HTML.
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <link rel="icon" href="favicon.ico" type="image/x-icon">
The first line creates a shortcut icon for the website. The second line creates an icon for the website.
What is favicon
A favicon is a small icon that is displayed in the browser’s address bar when a user visits a website. Favicons are typically used to represent a website’s name or logo, and can be customized to look different on different devices.
A Favicon is a small icon that appears in the address bar of your browser when you are on a website. It is usually a picture of the website’s logo.
How to make a favicon
To make a favicon in HTML, you will need to create a file called favicon.ico in your website’s root directory. The file should be sized at 96×96 pixels and contain only the image filename and the URL of the icon’s source file. For example, if your icon is named “logo.png” and is located at http://www.example.com/images/logo.png, the favicon file should look like this: