Learn Typography by Building a Nutrition Label - Step 4

how do i pass this step?

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Nutrition Label</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?" href="family=Open+Sans:400,700,800">
  </head>
  <body>
    <h1>Nutrition Facts</h1>
    <p>8 servings per container</p>
    <p>Serving size 2/3 cup (55g)</p>
  </body>
</html>
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36

Challenge: Learn Typography by Building a Nutrition Label - Step 4

Link to the challenge:

1 Like

what is the hint telling you to do?

this is the hint:

Passed

Within your head element, add a link element with the rel attribute set to stylesheet and the href attribute set to https://fonts.googleapis.com/css?family=Open+Sans:400,700,800.

This will import the Open Sans font family, with the font weight values 400, 700, and 800.

Also add a link element to link your styles.css file.

My response:
in your link looks like you have two href when only one is suggested in hint.
also you skipped the “also”. you might need a second link. instead of a second href.
you got this! good luck!

i still don’t understand … please explain it more for me

what is your hint saying to you right now.
Look at it, then respond back if you don’t understand it (let me know what it says also if that is the case)

Your code should have two self-closing link elements.

awesome! And your code currently only has 1. So 1 is missing.
What do you think you should do now?

what should i add in the next link

that’s a good question. You should look back at the instructions given…they mention it.

This will import the Open Sans font family, with the font weight values 400, 700, and 800.

Also add a link element to link your styles.css file.

and the last line is saying …?

Edit: “also add a link element to …”
So that’s what you are missing.
Let us know if you don’t know how to link to your stylesheet.
(but this is something you can easily google as well)

i still don’t understand

read this article

1 Like

very helpful article, looks like I was also missing this piece of code: type="text/css"i dont think we learned this previously

You do not need this attribute for these challenges.

interesting. what did i need? adding that was the only solution after trying several different formats

I can’t answer that without looking at the code you are using. You can click on the ask for help button (looks like a ?) to open a topic describing what you tried and/or believe and we can go from there.

All I can say in general is: this challenge (and previous challenges) did not need the type=“text/css” attribute.