Check out example codes for "h2 custom font family html css". It will help you in understanding the concepts better.

Code Example 1

<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto&display=swap">

Code Example 2

body {
font-family: 'Roboto', sans-serif;
}

Learn ReactJs, React Native from akashmittal.com