Hello friends, welcome to today's new blog post. Today I am going to tell you How to Add Google Fonts to Your Website on your website because there are many students who do not know how to use Google fonts on their website or any project. The disadvantage of this is that due to not using the correct font, the correct text does not appear on their website, which is a big disadvantage. Therefore, it is very important to use the correct font. Adding Google fonts is a very easy task, you just need to know a little bit. So let us understand step by step how to add fonts. what is done.
Follow the steps below:
Using Google Fonts is very easy, if you know the right way then you can do it, otherwise many people add the font but it does not work, so you should know the right way, so let us understand the steps.
- First of all you have to open your vs code, if you use any other code editor then you can use that also, otherwise you have to open vs code, keep in mind that vs code should be the updated version.
- Then you have to open the browser in your PC and search for Google Fonts. You have to click on the first link and you will see many fonts in it.
- As soon as you open the website, you have to open whatever font you are using.
- After opening, you will find a Get Font button on the right side, click on it, then click on the Get Embed Code button, in which you will get the font code.
- In this you will see two codes, one of which will be a link, which you will have to add in the head section of your code.
In the image above, you can see which code is of the head section and which is the CSS code. Both these codes are different. One is a link which connects your code and the other is a CSS code which changes the font.
Now you have seen how to copy the code but you don't know how to actually add the code in VS Code, so let us learn how to add the code in VS Code, this process is very simple, you just have to see the code given below how to add the code.
- First of all you have to open vs code, in that you have to add the default code of html in which you have to add the code in the head section which you can use shortcut (Shift + 1 ).
- After that, you have to add your code in the head section, where the head section starts, you have to add the link in it.
- After this, wherever you want to update the font, you have to update the code of your font there.
If you follow all the steps given by me correctly then the font will be added correctly and if you do not follow any step correctly then there may be a problem in your code due to which your code will not work.