DEV Community

Cover image for How To Use Google Fonts in web app🚀
venkateshpensalwar
venkateshpensalwar

Posted on

How To Use Google Fonts in web app🚀

As a new web developer, you want to use a different font sometimes so give a chance to Google Fonts it is a very big library for various fonts and I will show you how you can use it on your website.

You can you this Google font in 2 ways:

  1. include it in HTML.
  2. include it in CSS.

HTML:

  1. Go to website https://fonts.google.com/
  2. select any font you want and click on Get Font.

get font

  1. Then click on Get embed code.
  2. then copy the code for HTML and add your head tag in your HTML.

font code

CSS:

  1. After clicking on get embed code.
  2. Then click on the import radio button copy the code and add it to your CSS file.

include in css

After this, you can now use this new font in your styles in the following way

use font

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Cloudinary image

Zoom pan, gen fill, restore, overlay, upscale, crop, resize...

Chain advanced transformations through a set of image and video APIs while optimizing assets by 90%.

Explore