Learn Typography by Building a Nutrition Label - Step 4

Tell us what’s happening:
Describe your issue in detail here.
i am stuck on this part where it keeps telling me that i need two closing tags for and yet i have done that and i have tried other options and other combined answers but no luck.

  **Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html lang="en">
<head <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,800"</link> </head>
  <meta charset="UTF-8">
  <title>Nutrition Label</title>
</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:

They asked you to add a link element inside the head element.

If you reset the code , you will see that the head element consists of everything from <head> to
</head>

So to add the link element you must insert it between these two head tags.

(What you have above is not valid HTML as all tags have a single < at the start and a single > at the end. And you cannot have two head elements in the same file either)

i dont understand what you mean, i put it in the ---- but yet still nothing i even add <–> to rel and href to see if that was the problem but still nothing.

its telling me i need two self-closing which makes no sense to me because why would i need two " " closing links for one line?

Perhaps it is better to share some valid code with you to help you compare against yours.
Check here pls HTML link tag

okay, but why does it say href=“https://fonts.googleapis.com/css?family=Open+Sans:400,700,800” then if its suppose to be different that makes no sense.

and at the same time it still tells me that i require two self closing

i even just tried /> as a self closing but that doesnt work either and im lost.

I guess you are struggling with the syntax.
The example above was to show you proper syntax which is not the same thing as a solution for this exercise.

If you can focus on making your brackets match correctly and defining the link tag with all required syntax elements, then you can easily make changes to things like href which is just an attribute to tell the browser what you are linking to.

Try to get the syntax correct first is my advice. Please post updated code as well and I will give you a more direct review (usually I try to give hints but if that is not helping here I will be more direct)

Tell us what’s happening:
Describe your issue in detail here.

  **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="styles.css"><link/>
</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 */
link {

}

Please fix this line. Link is supposed to be self-closing.

You are also missing the other link element mentioned in the exercise.

that helped me find the solution.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.