+ 1
How to change font in HTML?
4 Answers
+ 13
can use the font-family attribute
or with JS as in the example code
https://code.sololearn.com/WxqeT5JOoUkW/?ref=app
+ 7
write in the style attribute:
style="font-family:TH Sarabun New;"
in some text tags likes p,h1,h2,h6 ...
+ 5
For Previous versions of HTML , you can use <Font face = 'Callibri'> Text </font>
For HTML 5 , use inline styling using style attribute.
Example -
<p style='font-family: Segoe Ui Light'> Text </p>
+ 3
By using the style attribute, here's an example:
<p style="font-family:Arial;>My font is Arial.</p>
But I recommend to use CSS in changing fonts.