Ask coding questions

← Back to all posts
Adding fonts in html
SAIRISHITHK

How do I add font to my text in html coding

Answered by seweed3 [earned 5 cycles]
View Answer
Voters
Vasanthakumar96
SergioCaada
Aizahh
JoelTaylor5
muchamadsururi
Helenamadridn
AlyaBatrisyia1
SAIRISHITHK
octopyBot
RolandJLevy
Comments
hotnewtop
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 <h1 style="font-family:x;">
You can put a font inside the x. Similarly this works for other text tags as well in html.

SAIRISHITHK

@seweed3 I thank You 😀😀

Coder100

You will have to do that in css:

SAIRISHITHK

@Coder100 Thank you for helping

aidanryan111

How do you add fonts to certain words

aranacraft2

@aidanryan111 Do this:

<Hey>Hey</Hey>

In css file, do:

hey {
font-family: "font";
}

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

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

PattanAhmed

@rjlevy Cool!
Thanks!

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

Coder100