-2

I am importing fonts from google fonts and applying that fonts on all elements of index page.

But not applying these fonts

In index.html

<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">

index.css

 .body {
  margin: 0;
  padding: 0;
  font-family: 'Press Start 2P'; }

1 Answers1

1

See this works, maybe you are trying to change in the body tag, replace .body with body

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
body {
  margin: 0;
  padding: 0;
  font-family: 'Press Start 2P', cursive;
}
Hello World!
Programmer Gaurav
  • 449
  • 1
  • 5
  • 16