S Haripriya
S Haripriya

Reputation: 11

font style is not changing in my html page

This is the code I followed:

@import url('https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Palette+Mosaic&display=swap');

.container {
   font-family: Architects Daughter;
}

h3 {    
   color:brown ;
}

this is the result I got

enter image description here

Upvotes: 0

Views: 57

Answers (1)

Scott Marcus
Scott Marcus

Reputation: 65808

font-family: Architects Daughter <-- Architects Daughter must be in quotes because it has a space in the name.

From the docs:

<family-name> The name of a font family. For example, "Times" and "Helvetica" are font families. Font family names containing whitespace should be quoted. For example: "Comic Sans MS".

@import url('https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Palette+Mosaic&display=swap');

.container {
   font-family: "Architects Daughter";
}

h3 {    
   color:brown ;
}
<h3 class="container">Login</h3>

Upvotes: 1

Related Questions