My bad if the title makes the issue sound complicated, but the JavaScript code which I'm attempting to work with is generally simple, I just don't really know what I'm doing.
To specify what the issue I'm stuck with is then, my attempt at including a google font into the webpage just isn't working, following the examples that I have seen online it seems to be written fine, but something or other seems to be wrong regardless.
The font I am trying to use is: https://fonts.google.com/specimen/Redressed#standard-styles
And the code I tried writing to include it is: <link href="https://fonts.googleapis.com/css2?family=Redressed&display=swap" rel="stylesheet">
Hopefully my inexperience isn't an issue, and thanks for the help.
CodePudding user response:
Try this one:
<style>
@import url('https://fonts.googleapis.com/css2?family=Redressed&display=swap');
</style>
font-family: 'Redressed', cursive;
CodePudding user response:
Your link tag is correct, that should load the font-file inside your webpage, but you need an extra step, in your CSS add this on your body
selector or any selector that need to use that font:
font-family: 'Redressed', cursive;
Without this, it will not load your custom font.
PD: Don't worry about inexperience, everyone starts like that