Import a Google Font

Import a Google Font
0

#1

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


#2

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


#3
  • 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}

#4

it is within the free challenges


#5

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


#6

Yes it worked. Thank you Nao


#7

No problem.

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

  • Nao