Solve problem "Import a Google Font" online - Learn Python 3 - Snakify

Lesson: HTML5 and CSS

Import a Google Font

Now, let's import and apply a Google font (note that if Google is blocked in your country, you will need to skip this challenge).

First, you'll need to make a call to Google to grab the Lobster font and load it into your HTML.

Copy the following code snippet and paste it into the top of your code editor:

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

Remember, before you can apply styles, like a new font, to an element, you'll need to create a CSS rule.

h2 {
font-family: Sans-serif;
}

Create a CSS rule for the font-family of Lobster and apply this new font to your h2 element.


The content on this page is licensed under Attribution-ShareAlike 4.0 International. Original authors: freeCodeCamp, the content was modified.