Problem with fonts | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Problem with fonts

I can't use fonts like handlee or Comic Sans in CSS.The only one that works is cursive.I'm writing my code on mobile phone is this the problem?

29th Aug 2018, 2:10 PM
Emanuele Falanga
Emanuele Falanga - avatar
4 Answers
+ 1
There are a few web fonts which are included in every browser so you just need to call them like cursive. But all other fonts which are not included in browsers need to be linked to the source of that font. So for Handlee you need to include this in index.html <link href="https://fonts.googleapis.com/css?family=Handlee" rel="stylesheet"> And after that in css font-family: 'Handlee', cursive;
29th Aug 2018, 6:02 PM
PandaThePumpkin
PandaThePumpkin - avatar
+ 3
If you want to use fonts outside of 'web safe fonts' you have to link them. Also you need to call for font family in css like this: * { font-family: Arial, sans-serif; }
29th Aug 2018, 2:52 PM
PandaThePumpkin
PandaThePumpkin - avatar
+ 2
PandaThePumpkin Sorry I didn't understand what do you mean with "web safe fonts". I wrote: { font-family:Handlee,cursive } The result is a text with the second font(cursive).But I want use Handlee and if I write only Handlee the text will write in default font. Why?
29th Aug 2018, 3:11 PM
Emanuele Falanga
Emanuele Falanga - avatar
0
PandaThePumpkin oh now I understood.Thank you so much😁
29th Aug 2018, 6:47 PM
Emanuele Falanga
Emanuele Falanga - avatar