1CSS
2@import url(https://fonts.googleapis.com/css?family=Roboto);
3
4HTML
5<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto"/>
6
7body{
8 font-family: "Roboto";
9}
1<!-- To Add Montserrat font or any font as such -->
2<!-- Go to https://fonts.google.com browse the font you like here, Montserrat-->
3<!-- On the right click embbed and get the link similar to one given below-->
4<link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet">
5<!-- add this ^ link inside your <head> tag i.e. before </head> -->
6<!-- In css you can specify the font family as -->
7font-family: "Montserrat", sans-serif;
1Check out the font names and change 'finger paint' to another font name to how different google font appears on webpage.
2<!DOCTYPE html>
3<html>
4<head>
5<link href='https://fonts.googleapis.com/css?family=Finger Paint' rel='stylesheet'>
6<style>
7body {
8 font-family: 'Finger Paint';font-size: 22px;
9}
10</style>
11</head>
12<body>
13
14<h1>Finger Paint</h1>
15<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
16<p>123456790</p>
17<p>ABCDEFGHIJKLMNOPQRSTUVWXYZ</p>
18<p>abcdefghijklmnopqrstuvwxyz</p>
19
20</body>
21</html>
22
1<!-- To import google font add this to the head of your HTML then you can use use the imported font family in your CSS file -->
2
3<link rel="preconnect" href="https://fonts.gstatic.com">
4<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">