Import a Google Font

I dont know how to add the Losbster font to the h2 element.

Where are you trying to do this?
Is it within the freeCodeCamp challenges?
Is it on codepen?

with some more information I’m sure we could help.

-Nao

  • Go to Google fonts
  • Find the font you want and click the red plus button
  • There should be a <link tag in the opened tab. Copy it.
  • Paste it into head of HTML
  • In the CSS code: h2 {font-family: ‘Lobster’, sans-serif}
1 Like

it is within the free challenges

so in that case, they give you the link you need to copy and paste into the html.

Then you need to add this to the css (or style section of the code):
h2 {
font-family: Lobster
}

hopefully that helps.

-Nao

Yes it worked. Thank you Nao

No problem.

just keep at it and read the notes from FreeCodeCamp in each excercise really closely.

  • Nao
1 Like