Learn Typography by Building a Nutrition Label - Step 4

Tell us what’s happening:

I need help for this Nutrition Label step4.
What’s the mistake from my code?

Your code so far

<!-- file: index.html -->

<!-- User Editable Region -->

<!DOCTYPE html>
<html lang="en">

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

<!-- User Editable Region -->

/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36

Challenge Information:

Learn Typography by Building a Nutrition Label - Step 4

Hi there,

There is a typo in the name of the stylesheet file.
It should be styles.css, not style.css.

Happy coding.

1 Like

I try already but they still said One of your link elements should have an href attribute set to ./styles.css
What should I do?

That’s strange.
Could you please post your updated code?

You can post your updated code by put your code between 2 line of ``` (3 back ticks) (the back tick key is usually under the Esc key on your keyboard), like this:

```
# your code here
```

or you can use the Preformatted Text button:

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Nutrition Label</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,800" rel="stylesheet">
<link rel="stylesheet" href="./styles.css">
</head>

<body>
  <h1>Nutrition Facts</h1>
  <p>8 servings per container</p>
  <p>Serving size 2/3 cup (55g)</p>
</body>
</html>

Your solution works from my end. Please try one of the following steps to move forward.

Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.

or - Try the step in incognito or private mode.

or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

or - Ensure your browser is up-to-date or try a different browser.

I hope one of these will work for you.

1 Like

I already passed.
Thank you :pray: :pray:

2 Likes