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

Code Example 1

<!-- Chrome, Edge, Firefox -->
<link rel="icon" href="favicon.svg">

<!-- Safari -->
<link rel=”mask-icon” href=”mask-icon.svg” color=”#000000">

Learn ReactJs, React Native from akashmittal.com