Can we change the font style in html ...?? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 1

Can we change the font style in html ...??

if yes than what are the different font style we use ex ,<h1 style ="font-family : ______?;">what are the different font which I can apply here..?<\h1> https://code.sololearn.com/WLs2fm9uYOrl/?ref=app

28th Jun 2018, 6:59 PM
Ranjeet
Ranjeet - avatar
5 Respuestas
+ 5
You can use whatever source you have installed on your device, but keep in mind that if others do not have that source installed, they will see the default source that the browser uses. A good option is to include google fonts: https://medium.freecodecamp.org/how-to-use-google-fonts-in-your-next-web-design-project-e1ad48f1adfa
28th Jun 2018, 7:11 PM
Mickel
Mickel - avatar
+ 2
It's because you're specifying another font. The purpose of Google Fonts is to offer a collection of sources that you can use on all devices, precisely to prevent your design from looking bad. Since you imported the 'Spirax' typeface, you should put the code like this: <h1 style = "background-color: yellow; font-family: 'Spirax', cursive;"> Hello </ h1>
28th Jun 2018, 7:41 PM
Mickel
Mickel - avatar
+ 1
Reet Look at your code on the PC, everything works.
28th Jun 2018, 7:58 PM
Olga
28th Jun 2018, 7:23 PM
Ranjeet
Ranjeet - avatar
0
You do not need two style attributes in the same tag. We need to put it all together.
28th Jun 2018, 8:01 PM
Olga