João Alves
João Alves

Reputation: 15

font-family is not working in my css file

I'm working with css in my mockup, and I need to put a specific font, in this case the font as the name of Roboto, but when I put that font on css, the font doesn't change

Here's the code:

.field__item p{
 font-family: 'Roboto', sans-serif;
 color:red;
 
}

Upvotes: 1

Views: 64

Answers (1)

Bernardo Almeida
Bernardo Almeida

Reputation: 468

Follow this steps:

1- Go to Google fonts website here: https://fonts.google.com/

2- Search for the font Roboto on search bar

3- Select the sizes you want

4- And then you have on your right a code like this: <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">

5- Then after paste that code into your file, the font should work

Upvotes: 2

Related Questions