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@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');
2.generic_class {
3 font-family: 'Open Sans', sans-serif;
4}
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;
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">
1<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&lang=en" />