Learn Typography by Building a Nutrition Label - Step 65

Tell us what’s happening:
Describe your issue in detail here.
I’m typing the right formula is not letting me give me a correction Do ya’ll see any issues?
Your code so far

<!-- file: index.html -->
<!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 href="./styles.css" rel="stylesheet">
</head>

<body>
  <div class="label">
    <header>
      <h1 class="bold">Nutrition Facts</h1>
      <div class="divider"></div>
      <p>8 servings per container</p>
      <p class="bold">Serving size <span>2/3 cup (55g)</span></p>
    </header>
    <div class="divider large"></div>
    <div class="calories-info">
      <div class="left-container">
        <h2 class="bold small-text">Amount per serving</h2>
        <p>Calories</p>
      </div>
      <span>230</span>
    </div>
    <div class="divider medium"></div>
    <div class="daily-value small-text">
      <p class="bold right no-divider">% Daily Value *</p>
      <div class="divider"></div>
      <p><span><span class="bold">Total Fat</span> 8g</span> <span class="bold">10%</span></p>
      <p class="indent no-divider">Saturated Fat 1g <span class="bold">5%</span></p>
      <div class="divider"></div>
      <p class="indent no-divider"><span><i>Trans</i> Fat 0g</span></p>
      <div class="divider"></div>
      <p><span><span class="bold">Cholesterol</span> 0mg</span> <span class="bold">0%</span></p>
      <p><span><span class="bold">Sodium</span> 160mg</span> <span class="bold">7%</span></p>
      <p><span><span class="bold">Total Carbohydrate</span> 37g</span> <span class="bold">13%</span></p>
      <p class="indent no-divider">Dietary Fiber 4g</p>
      <div class="divider"></div>
      <p class="indent no-divider">Total Sugars 12g</p>
      <div class="divider double-indent"></div>
      <p class="double-indent no-divider">Includes 10g Added Sugars <span class="bold">20%</span>
      <div class="divider"></div>
      <p class="no-divider"><span class="bold">Protein</span> 3g</p>
      <div class="divider large"></div>
      <p>Vitamin D 2mcg <span>10%</span></p>
      <p>Calcium 260mg <span>20%</span></p>

<!-- User Editable Region -->

      <p>Iron 8mg <span>45%</span></p>
<p class="no-divider">Potassium 235mg <span>6%</span></p>
<div class="divider medium"></div>
<p class='note'>* The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.</p>



<!-- User Editable Region -->

  </div>
</body>
</html>
/* file: styles.css */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Open Sans', sans-serif;
}

.label {
  border: 2px solid black;
  width: 270px;
  margin: 20px auto;
  padding: 0 7px;
}

header h1 {
  text-align: center;
  margin: -4px 0;
  letter-spacing: 0.15px
}

p {
  margin: 0;
  display: flex;
  justify-content: space-between;
}

.divider {
  border-bottom: 1px solid #888989;
  margin: 2px 0;
}

.bold {
  font-weight: 800;
}

.large {
  height: 10px;
}

.large, .medium {
  background-color: black;
  border: 0;
}

.medium {
  height: 5px;
}

.small-text {
  font-size: 0.85rem;
}


.calories-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.calories-info h2 {
  margin: 0;
}

.left-container p {
  margin: -5px -2px;
  font-size: 2em;
  font-weight: 700;
}

.calories-info span {
  margin: -7px -2px;
  font-size: 2.4em;
  font-weight: 700;
}

.right {
  justify-content: flex-end;
}

.indent {
  margin-left: 1em;
}

.double-indent {
  margin-left: 2em;
}

.daily-value p:not(.no-divider) {
  border-bottom: 1px solid #888989;
}

Your browser information:

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

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

Link to the challenge:

" Add a medium divider after your .daily-value element."

Where does your .daily-value element end? I think you accidentally deleted the ending </div> tag.

I tried and it is still not giving me a pass

You need to show us what you changed so we can see exactly what you did. Please paste your updated HTML in here using the triple back tick technique.

To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key. You may also be able to use Ctrl+e to automatically give you the triple back ticks while you are typing in the this editor and the cursor is on a line by itself. Alternatively, with the cursor on a line by itself, you can use the </> button above the editor to add the triple back ticks.

This is what my code is

* The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

You need to paste your entire HTML in here using the triple back tick technique I described above. We can’t help you until you do that. And make sure you include all of your HTML.

Nutrition Label

Nutrition Facts

8 servings per container

Serving size 2/3 cup (55g)

Amount per serving

Calories

230

% Daily Value *

Total Fat 8g 10%

Saturated Fat 1g 5%

Trans Fat 0g

Cholesterol 0mg 0%

Sodium 160mg 7%

Total Carbohydrate 37g 13%

Dietary Fiber 4g

Total Sugars 12g

Includes 10g Added Sugars 20%

Protein 3g

Vitamin D 2mcg 10%

Calcium 260mg 20%

  <p>Iron 8mg <span>45%</span></p>

Potassium 235mg 6%

* The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

You are getting closer, but your entire HTML needs to be wrapped in triple back ticks.

Nutrition Label

Nutrition Facts

8 servings per container

Serving size 2/3 cup (55g)

Amount per serving

Calories

230

% Daily Value *

Total Fat 8g 10%

Saturated Fat 1g 5%

Trans Fat 0g

Cholesterol 0mg 0%

Sodium 160mg 7%

Total Carbohydrate 37g 13%

Dietary Fiber 4g

Total Sugars 12g

Includes 10g Added Sugars 20%

Protein 3g

Vitamin D 2mcg 10%

Calcium 260mg 20%

* The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

It seems like you are able to copy/paste your HTML. You just need to use the triple back ticks to format it properly. If you can’t find them on your keyboard then you can use the </> button in the editor menu.

1 Like

I got the question I was stuck with Thank you!!

I’ve got it right Thank u for ur help!!

1 Like

I have a question do u undertake(What I mean by undertaking mentoring) people who are new to tech and have serious interest in web development or no?

I do all of my “mentoring” here in the forums :slightly_smiling_face:

1 Like

“Thank you so much for sharing that! It’s really inspiring to hear that you’re actively mentoring in the forum. I’m fairly new to coding and I’m excited to learn more. Your experience as a mentor must provide you with valuable insights. How did you get started with web development, and do you have any advice for someone like me who’s just starting out? I’m eager to improve my skills and contribute to the community as well.”

I got a Computer Science degree back when the World Wide Web was barely a thing. I’ve been hooked ever since.

I know you’re excited and want to get going ASAP, but my advice would be not to rush and make sure you really understand the basics before you move on to more advanced things. Also, don’t forget about books. I know YouTube video tutorials are all the rage nowadays, but pound for pound, I still think a good book is a better deal. Of course, that could just be the old guy in me talking since we didn’t have YouTube when I was originally learning this stuff.

And finally, if you ask me, the most important trait a developer/programmer can have is curiosity. The willingness to dig into something and figure out how it works. The desire to search for information and then play around with it until you completely understand it and can apply it to your own projects. You aren’t satisfied with just knowing the answer, but rather knowing why that’s the answer. If you like reading through tedious documentation and deciphering unfamiliar code then you will most likely excel in this business.

1 Like

Thank you for the advice