how to set website icon in html code example

Example 1: how to add favicon in html

<link rel="shortcut icon" type="image/png" href="Link to the image"/>

Example 2: adding a favicon in html

<link rel="icon" type="image/png" href="/favicon.png"/>
<link rel="icon" type="image/png" href="https://example.com/favicon.png"/>

Example 3: how to change tab icon in html

<link rel="shortcut icon" href="http://sstatic.net/stackoverflow/img/favicon.ico">

Example 4: how to add an icon to your html website

<link rel="shortcut icon" href="http://sstatic.net/stackoverflow/img/favicon.ico">

Example 5: how to add icon to custom page tab

<link rel="icon" href="http://example.com/favicon.png">

Tags:

Go Example