Skip to main content

Add google font in website | how to insert custom font in website - scoobcode

As per the requirement sometimes web developers have to use an external custom font style. And this requirement can be fulfilled by Google font. There have many websites to fulfill the requirement. But the reason behind why I choose this place because google font most user-friendly, fast, and reliable.

Here in this blog, I will share some steps to add google font to your website code. Also, I had already uploaded the full video tutorial on our YouTube channel. You can also check out our video.

Full video tutorial: https://youtu.be/qNT-pli5qTM

Note: Copy the code and make your own design. Also, go to our YouTube channel for more useful content.

Steps

Step_1
Step 1: Search Google font in any browser or go to this link font.google.com

Step_2
Step 2: After opening the website choose any font face

Step_3
Step 3: Select any font style

Step_4

Ster_4
Step 4: Two way of getting code

Step_5
Step 5: Copy the link and paste your HTML code (Method 1)

Step_6
Step 6: Paste the code in your HTML file

Step_7
Step 7: Add the CSS code

Step_8
Step 8: Check the output

You can also use method 2.

Copy the import tag and paste it into the CSS file (Method 2)


Source code

👉 HTML

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Add-Google-Font</title>

    <style>
       @import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@100&display=swap');
        *{
            font-family: 'Roboto Mono', monospace;
        }
    </style>

</head>

<body>
    <h1>Add google font</h1>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Omnis, iusto. Iste iusto aperiam et dolore fugit
        reiciendis quaerat ratione, asperiores laborum quisquam neque natus dolor magni quas delectus aut! Recusandae ea
        aut doloremque possimus facere ipsum ipsam ex magni eaque illum tempora vero inventore quia blanditiis, animi
        cum, maiores suscipit!</p>
</body>

</html>

You can support me to like this blog and share it with your programmer friends. Go to my youtube channel scoobcode and watch the full tutorial video.

Comments

Popular posts from this blog

Create social media icon hover effect using HTML and CSS - scoobcode

Here in this blog, we going to learn how to create social media icon hover effect using only HTML & CSS. Make social media icons more attractive. Here I use Fontawesome for social media icons. Full video tutorial:  https://youtu.be/Ks2AHt3e_BM Fontawesome:  https://fontawesome.com Note: Copy the code and make your own design. Also, go to our YouTube channel for more useful content. Source code 👉 HTML <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta http-equiv="X-UA-Compatible" content="IE=edge">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <link rel="stylesheet" href="style.css">     <script src="https://kit.fontawesome.com/e326c3f2a0.js" crossorigin="anonymous"></script>     <title>Hover effect</title> </head> <body>          <div class=&quo

Make profile card design with hover effect using HTML and CSS - scoobcode

This blog will show you how to make a profile card design with a hover effect using HTML and CSS. Profile card is used for a short introduction for a specific person. Full video tutorial:  https://youtu.be/9XXMJAuquCI Resources:  https://github.com/scoobcode/profile_card_design.git Note: Copy the code and make your own design. Also, go to our YouTube channel for more useful content. Source code 👉  HTML <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta http-equiv="X-UA-Compatible" content="IE=edge">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Info-card</title>     <link rel="stylesheet" href="style.css">     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" integrity="sha512-5A8nwdMOWrSz20fDsjczgUidUB