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

Code Example 1

<! -- For .ico files -->
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">

<! -- For .jpg/.gif/.png files -->
<link rel="icon" type="image/gif/png" href="favicon.png">

Learn ReactJs, React Native from akashmittal.com