How to use Google fonts in CSS?It is an important aspect of any web design to choose the right font for the webpage. The use of Google fonts is advantageous because we get elegant fonts for our website. The Google fonts API makes it easier and quicker for everyone to use web-fonts. These fonts have been tested on various browser configurations. Instead of doing any programming, we simply have to add a special stylesheet link to our HTML document, then refers to the font family of our choice in the CSS style. There are two steps to start using the Google font API that are as follows:
It is to be noted that when specifying a web font in CSS style, we should always mention at least one fallback web-safe font for avoiding unexpected behaviors. We can add the generic font name such as sans-serif or serif to the end of the list so that the browser will use it as the default font when required. Using @importWe can import the font family from the web font service such as Google fonts. It is to be placed in the
Hi, Welcome to the tutorialsinfo.com. This site is developed so that students may learn computer science related technologies easily. The tutorialsinfo.com is always providing an easy and in-depth tutorial on various technologies. No one is perfect in this world, and nothing is eternally best. But we can try to be better. |