# Build a Nutritional Label - 步骤 44

**URL:** <https://forum.freecodecamp.org/t/build-a-nutritional-label-44/788609>\
**Category:** General\
**Tags:** chinese-中文\
**Created:** [May 12, 2026, 11:45am UTC](https://forum.freecodecamp.org/t/build-a-nutritional-label-44/788609 "2026-05-12T11:45:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![supe1Man](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/supe1man/32/415255_2.png) [@supe1Man](https://forum.freecodecamp.org/u/supe1Man)\
**Post date:** [May 12, 2026, 11:45am UTC](https://forum.freecodecamp.org/t/build-a-nutritional-label-44/788609/1 "2026-05-12T11:45:49Z")

</div>

### 告诉我们发生了什么：

i had pun the span tag around Total Fat 8g,why it still not work?

### 到目前为止你的代码

```html
<!-- 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">% Daily Value *</p>
      <div class="divider"></div>

<!-- User Editable Region -->

      <p>
        <span>
            <span class="bold">Total Fat</span> 8g
        </span> 
        <span class="bold">10%</span>
      </p>

<!-- User Editable Region -->

    </div>
  </div>
</body>
</html>

```

```css
/* 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;
}

```

### 你的浏览器信息：

用户代理是： `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36 Edg/148.0.0.0`

### 挑战信息：

Build a Nutritional Label - 步骤 44

> **[freeCodeCamp.org](https://www.freecodecamp.org/chinese/learn/responsive-web-design-v9/workshop-nutritional-label/step-44)**
>
> 免费学习编程

Github Link: [i18n-curriculum/curriculum/challenges/chinese/blocks/workshop-nutritional-label/667d1bb875f5961913176069.md at main · freeCodeCamp/i18n-curriculum · GitHub](https://github.com/freeCodeCamp/i18n-curriculum/blob/main/curriculum/challenges/chinese/blocks/workshop-nutritional-label/667d1bb875f5961913176069.md)

---

<div class="post-metadata">

**Author:** ![dhess](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dhess/32/406235_2.png) [@dhess](https://forum.freecodecamp.org/u/dhess)\
**Post date:** [May 12, 2026, 2:19pm UTC](https://forum.freecodecamp.org/t/build-a-nutritional-label-44/788609/2 "2026-05-12T14:19:42Z")

</div>

Welcome to the forum @supe1Man!

> [@supe1Man](#):
>
> ```auto
> <p>
> <span>
> <span class="bold">Total Fat</span> 8g
> </span> 
> <span class="bold">10%</span>
> </p>
> 
> ```

Try writing your code all on one line.

Happy coding!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [June 9, 2026, 2:20pm UTC](https://forum.freecodecamp.org/t/build-a-nutritional-label-44/788609/3 "2026-06-09T14:20:31Z")

</div>

Closed on June 9, 2026, 2:20pm UTC

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