Skip to content
← Back to Community
Adding fonts in html
Profile icon
SAIRISHITHK

How do I add font to my text in html coding

Answered by seweed3 [earned 5 cycles]
View Answer
Voters
Profile icon
Vasanthakumar96
Profile icon
SergioCaada
Profile icon
Aizahh
Profile icon
JoelTaylor5
Profile icon
muchamadsururi
Profile icon
Helenamadridn
Profile icon
AlyaBatrisyia1
Profile icon
SAIRISHITHK
Profile icon
octopyBot
Profile icon
RolandJLevy
Comments
hotnewtop
Profile icon
seweed3

Do you want font or font size? If you want font you can do this:
If you have a h1 tag, and you want to change the size you can do


You can put a font inside the x. Similarly this works for other text tags as well in html.

Profile icon
SAIRISHITHK

@seweed3 I thank You 😀😀

Profile icon
Coder100

You will have to do that in css:

body { font-family: cursive; }
Profile icon
SAIRISHITHK

@Coder100 Thank you for helping

Profile icon
aidanryan111

How do you add fonts to certain words

Profile icon
EvolentStudios

@aidanryan111 Do this:

Hey

In css file, do:

hey {
font-family: "font";
}

Im new to html and css, so it may not work, good luck!

Profile icon
RolandJLevy

Hi @SAIRISHITHK,
@PattanAhmed
and @Coder100 have given some good links.
You can also use Google fonts. I made this example showing how to implement Google fonts: https://repl.it/@rjlevy/Google-fonts

Profile icon
PattanAhmed

@rjlevy Cool!
Thanks!

Profile icon
PattanAhmed

@SAIRISHITHK Hi,
I think this website might help you a lot
Click here
or
This

Hope this helps

Please mark my answer if this helps

Profile icon
Coder100