Choosing the right font for your webpage is a very important aspect of any design. Using a web font service enables you to use a wide variety of fonts fit for presenting the data in your webpage. Google Fonts is a free web font service which hosts a huge variety of fonts to choose from. We can use these fonts in our webpages.
To use a custom font, we need to import the font family from the web font service, Google Fonts, in this case.
Method-1: Using <link> tag
<link href=’https://fonts.googleapis.com/css?family=Sofia’ rel=’stylesheet’/>
Method-2: Using @import rule
- CSS | Fonts
- CSS | Web Fonts
- Difference between node.js require and ES6 import and export
- CSS | @import rule
- What is the best way to include CSS file? Why use @import?
- SASS | @import
- How to import config.php file in a PHP script ?
- ES6 | Import and Export
- How to Import another TypeScript Files ?
- How to import SASS through npm ?
- How to import LESS through npm ?
- What is the difference between declarations, providers, and import in NgModule?
- How to import data from .CSV file into MySQL table using Node.js ?
- Import and Export in Node.js
- How to add Google map inside html page without using API key ?
- Python script to open a Google Map location on clipboard
- How To Add Google Maps With A Marker to a Website
- How To Add Google Translate Button On Your Webpage?
- How to Add Google Charts on a Webpage?
- Google Geo-coding Web Service (JSON response)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.