+ 3
I've got a problem.
https://code.sololearn.com/Wgc2GTDLz95J/?ref=app I can't upload the font to my HTML document. Can someone tell me what's wrong with it?
5 Respuestas
+ 6
Once the related css font-file is linked to your html, you must apply it to some element with css definition, either inlined (in 'style' htm attribute) or in external linked css file or in <style> html element (in code playground, it could be done in the css tab) trough the use of 'font-family' css property... targeting body will let most of your page content inherit the same font. (ie: form elements doesn't inherit font definition by default, so if you want to use a font on them, you have to target them specifically)
inlined:
<body style="font-family:Roboto;">
css defined:
body {
font-family:Roboto;
}
to target forms elements (it's possible that I forgot some^^):
input, button, textarea {
font-family:Roboto;
}
+ 10
How to import google fonts in html document👇👇
https://www.w3schools.com/howto/tryit.asp?font=Sofia
https://stackoverflow.com/questions/14676613/how-to-import-google-web-font-in-css-file
+ 3
Thanks everyone.
+ 2
@Sampath: OP still right import google fonts ^^
+ 2
:)