How to font change in css? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

How to font change in css?

How to change fonts in css style please tell me.

15th Jul 2023, 10:12 AM
Subhransu Pradhan
Subhransu Pradhan - avatar
28 Answers
15th Jul 2023, 10:22 AM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 4
The process will be same. Here the style tag is working of css playground code.
15th Jul 2023, 10:20 AM
Gulshan Mahawar
Gulshan Mahawar - avatar
15th Jul 2023, 10:29 AM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 3
Thank you so much sir❤️😁🙏
15th Jul 2023, 10:30 AM
Subhransu Pradhan
Subhransu Pradhan - avatar
+ 2
You can change the font size by the following- <div>hello world</div> <style> div{ font-size: 50px; } </style> It is inside the html playground code. You can change the value of font size.
15th Jul 2023, 10:17 AM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 2
left the style tag and div tag and paste it in css playground code.
15th Jul 2023, 10:19 AM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 2
Ok
15th Jul 2023, 10:21 AM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 2
Do you want to say font-family?
15th Jul 2023, 10:26 AM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 2
Font family name Example cursive This is font-family : cursive; monospace This is font-family : monospace; sans-serif This is font-family : sans-serif; serif This is font-family : serif; fantasy This is font-family : fantasy;
17th Jul 2023, 6:43 AM
Jitendra Lariya
Jitendra Lariya - avatar
+ 2
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS font-family example</title> </head> <body> <p style="font-family: cursive; font-size:30px;">This is font-family : cursive</p> <p style="font-family:monospace; font-size:30px;">This is font-family : monospace</p> <p style="font-family:sans-serif; font-size:30px;">This is font-family : sans-serif</p> <p style="font-family:serif; font-size:30px;">This is font-family : serif</p> <p style="font-family:fantasy; font-size:30px;">This is font-family : fantasy</p> </body> </html>
17th Jul 2023, 6:44 AM
Jitendra Lariya
Jitendra Lariya - avatar
+ 2
Serif Sans-serif Monospaced font Arial Verdana Helvetica Courier Garamond Calibri Optimal Didot Comic Sans Cambria Bro they are the values of font-family!
17th Jul 2023, 11:51 AM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 2
Yes thanks
18th Jul 2023, 12:12 AM
Subhransu Pradhan
Subhransu Pradhan - avatar
+ 1
Sir in css style of font change
15th Jul 2023, 10:18 AM
Subhransu Pradhan
Subhransu Pradhan - avatar
+ 1
Sir I don't understand please complete the code and send please sir
15th Jul 2023, 10:20 AM
Subhransu Pradhan
Subhransu Pradhan - avatar
+ 1
Ok sir I will try
15th Jul 2023, 10:21 AM
Subhransu Pradhan
Subhransu Pradhan - avatar
+ 1
To change fonts, you use the font-family property. However the font must be available in you device or it won't work
16th Jul 2023, 11:31 AM
Rex Cherish Okoha
+ 1
Use "font-size" It can take values in pixel(px) and em. 2em == 16px. If it can take any more values please state below.
16th Jul 2023, 3:50 PM
Leeroy Mokua
Leeroy Mokua - avatar
16th Jul 2023, 4:03 PM
Jitendra Lariya
Jitendra Lariya - avatar
+ 1
https://code.sololearn.com/WHIR4G4FaWF8/?ref=app
16th Jul 2023, 4:04 PM
Jitendra Lariya
Jitendra Lariya - avatar