How to use google fonts using HTML and CSS


How to use google fonts using HTML and CSS

Hi friends, in this tutorial I will explain how to use google fonts using HTML and CSS on web pages or any kind of web application. It is very simple and easy to use google fonts as the CSS link for google fonts and google Roboto fonts is already available in Google. We just need to copy the link from Google and save it in an external CSS file.

Also read, How to create three column layout equally using HTML and CSS

Required steps to use google fonts using HTML and CSS

Step 1:- Go to Google and search for Google fonts as shown in the below screenshot.

How to use google fonts using HTML and CSS

Step 2:- Choose a font family from the various options provided by Google as shown in the below screenshot that you want to apply to your web page or application.

How to use google fonts using HTML and CSS

Step 3:- Here, you can see the different styles for the font family you have selected in step 2. Now you can select the style as shown in the below screenshot.

How to use google fonts using HTML and CSS

Step 4:- After the font style selection, a CSS link will be shown on the right side as shown below

How to use google fonts using HTML and CSS

Step 5:- Now create a folder in your root directory of the local server and create an HTML file inside that directory.

Step 6:- Now, copy the CSS link shown in step 5 and paste it into the HTML file as shown below.

googlefonts.html

<!DOCTYPE>
<html>
    <head>
        <title>Google Fonts</title>
        <link rel="preconnect" href="https://fonts.googleapis.com">
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
        <link rel="stylesheet" href="custom.css">
    </head>
    <body>
        <h3 align="center">This is the H3 heading</h3>
        <p align="center">This is the paragraph where we can apply the Google fonts to get the font style effect.</p>
    </body>
</html>
    

Step 7:- Create a custom CSS file inside the folder you have created in the root directory and paste the line in the CSS file as shown below.

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

Step 8:- Now, you can hit the URL on the browser and check like this https://localhost/googlefonts/googlefonts.html

Here is the image below before applying google fonts

How to use google fonts using HTML and CSS

Here is the image below after applying google fonts

How to use google fonts using HTML and CSS

Conclusion:- I hope this tutorial will help you to understand the overview. If there is any doubt then please leave a comment below.


Leave a Comment

CERI188

slot thailand

parlay

parlay

situs sabung ayam

CERI188 TOTO 4D

CERI188

THOR311 RTP

RATU311

RATU311

RATU311

THOR311

THOR311

THOR311

RATU311

RATU311

KUPU178

KUPU178

RATU311

RATU311

RATU311

Mahjong Ways 2

CERI188

CERI188

sv388

CERI188

KUPU178 TOTO SLOT

CERI188

CERI188 TOTO Singapore

KUPU178

RATU311

sabung ayam online

THOR311

parlay

RATU311

KUPU178

RATU311

RATU311

KUPU178

KUPU178

KUPU178

RATU311

RATU311

CERI188

CERI188

KUPU178

RATU311: Alternatif karnpuracollege

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

KUPU178

RATU311

RATU311

RATU311

judi bola

live casino

sv388

sv388

sabung ayam online

sabung ayam online

Thor311 Terbaru

CERI188: Taruhan Bola Sbobet

THOR311 MAHJONG

RATU311: BONUS SABUNG AYAM

CERI188

parlay

KUPU178

RATU311

THOR311

RATU311

RATU311

RATU311

RATU311

RATU311

CERI188

CERI188: Masuk Akun Slot Super Cepat

KUPU178: Slot Online Mahjong Bet 200

THOR311 PRO

THOR311

CERI188

CERI188

CERI188

CERI188

CERI188

CERI188

CERI188

CERI188

THOR311

HOKI311

HOKI311

RATU311

RATU311

KUPU178

THOR311

KUPU178

THOR311

RATU311

HOKI311

KUPU178

KUPU178

RATU311

THOR311 TOTO4D

KUPU178

Live Casino Roullate

RATU311

RATU311

RATU311

RATU311

THOR311

THOR311

THOR311

RATU311

CERI188

DAFTAR KUPU178

LINK DAFTAR CERI188

CERI188

KUPU178

CERI188

CERI188

RATU311

KUPU178

THOR311 DOMINO QQ

judi bola online

Mix Parlay

CERI188

CERI188

RATU311

live casino online

RATU311

Mix Parlay

Slot PG Soft

CERI188

RATU311

RATU311

CERI188

THOR311

CERI188

THOR311

Game Thor311

THOR311

HOKI311

live casino

sv388

HOKI311

HOKI311

slot mahjong

Thor311 Alternatif

RATU311

HOKI311

HOKI311

HOKI311

HOKI311

CERI188

THOR311 RESMI

THOR311 AKSES

parlay

HOKI311

THOR311

RATU311 NONTON BOLA

CERI188 Link RTP LIVE

THOR311

Thor311 Live Casino

CERI188

akses VIP THOR311

THOR311

link daftar THOR311

THOR311

situs thor311

RATU311

HOKI311 Link SABUNG AYAM RESMI

HOKI311 Link QRIS EWALLET

RATU311

LINK CERI188

parlay

HOKI311 Link RTP Gacor

HOKI311 Link Apk Resmi

CERI188

KUPU178 Link Daftar

CERI188

CERI188

CERI188

CERI188

CERI188

HOKI311

RATU311

RATU311

HOKI311 Lapak Arena Slot

RATU311 judi bola

HOKI311 Link Spaceman Online

HOKI311 Link Daftar Resmi

CERI188 Toto SGP Online

KUPU178

HOKI311 TEMBAK IKAN ONLINE

KUPU178

HOKI311 Link Login Alternatif

HOKI311 Live Casino Online

HOKI311 Situs Slot Gacor

THOR311

THOR311

situs judi bola

Ceri188 Game Online

CERI188

link login CERI188

link login CERI188

CERI188

THOR311

HOKI311

HOKI311

CERI188

parlay

THOR311

RATU311

HOKI311

HOKI311

HOKI311

RATU311

THOR311

KUPU178

HOKI311

KUPU178

KUPU178

HOKI311

parlay

slot gacor

kupu178 link alternatif

kupu178 slot

kupu178 daftar

kupu178 login

link daftar kupu178

judi bola

HOKI311

RATU311

link alternatif RATU311

Link daftar RATU311

link login RATU311

RATU311

RATU311

KUPU178

KUPU178

THOR311

KUPU178

KUPU178

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

THOR311

KUPU178

KUPU178

HOKI311

THOR311

KUPU178

THOR311

THOR311

slot thailand

judi bola

THOR311

THOR311

KUPU178

THOR311

THOR311

slot gacor

slot gacor

yakuza303

unobet77

slot gacor

slot gacor

RATU311

parlay

parlay

slot gacor

parlay

THOR311