Search code examples
htmlcsshyperlinkgoogle-font-api

How can i import all google font at once?


I want help on importing all of Google web font at once , I tested the normal 'link rel' in my head tag to import The Family Tangerine for my post and it worked perfectly. Although i want a way in which i can import all the fonts available, so i can use them whenever i want , do i have to write them one by one or is there any full embedded link rel for all of them . Pease help me out.


Solution

  • You can import all Google Fonts to your website using the Easy Fonts library. All you have to do is import the following CSS file:

    <link href="https://pagecdn.io/lib/easyfonts/fonts.css" rel="stylesheet" />
    

    and, then use the fonts the way you want. Additionally, you can also use the font families and font weights using CSS classes as below:

    <div class="font-lato w500i">
        <a class="font-open-sans w700" href="https://google.com">Google</a>
    </div>
    

    Full class reference for each font family is available here.