Check out example codes for "how to add favicon in html". It will help you in understanding the concepts better.

Code Example 1

<link rel="icon" href="yourIcon.png" type="image/png">

Code Example 2

<head>
  <title>Webpage</title>
  <link rel="icon" type="image/gif/png" href="favicon.png">
</head>

Code Example 3

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

Code Example 4

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

Code Example 5

<link rel="icon" type="image/png" href="/favicon.png"/>

Code Example 6

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

Learn ReactJs, React Native from akashmittal.com