# 通过创建猫咪相册应用学习 HTML - 步骤 56

**URL:** <https://forum.freecodecamp.org/t/html-56/700555>\
**Category:** General\
**Tags:** chinese-中文\
**Created:** [July 13, 2024, 4:30pm UTC](https://forum.freecodecamp.org/t/html-56/700555 "2024-07-13T16:30:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toto197](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@Toto197](https://forum.freecodecamp.org/u/Toto197)\
**Post date:** [July 13, 2024, 4:30pm UTC](https://forum.freecodecamp.org/t/html-56/700555/1 "2024-07-13T16:30:08Z")

</div>

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

Ask help for the step 56"Associate the text Loving with the checkbox by nesting only the text Loving in a label element and giving it an appropriate for attribute."  
困在了猫咪相册的第56关“通过仅给 label 元素添加文本 Loving，并给它添加适当的 for 属性值，将文本 Loving 与复选框相关联。”

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

```html
<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <section>
        <h2>Cat Photos</h2>
        <!-- TODO: Add link to cat photos -->
        <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
        <a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
      </section>
      <section>
        <h2>Cat Lists</h2>
        <h3>Things cats love:</h3>
        <ul>
          <li>cat nip</li>
          <li>laser pointers</li>
          <li>lasagna</li>
        </ul>
        <figure>
          <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">
          <figcaption>Cats <em>love</em> lasagna.</figcaption>  
        </figure>
        <h3>Top 3 things cats hate:</h3>
        <ol>
          <li>flea treatment</li>
          <li>thunder</li>
          <li>other cats</li>
        </ol>
        <figure>
          <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg" alt="Five cats looking around a field.">
          <figcaption>Cats <strong>hate</strong> other cats.</figcaption>  
        </figure>
      </section>
      <section>
        <h2>Cat Form</h2>
        <form action="https://freecatphotoapp.com/submit-cat-photo">
          <fieldset>
            <legend>Is your cat an indoor or outdoor cat?</legend>
            <label><input id="indoor" type="radio" name="indoor-outdoor" value="indoor"> Indoor</label>
            <label><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label>
          </fieldset>
          <fieldset>
            <legend>What's your cat's personality?</legend>

<!-- User Editable Region -->

           <input id="loving" type="checkbox">Loving      
            <label for="loving"> Loving</label>    

<!-- User Editable Region -->

          </fieldset>
          <input type="text" name="catphotourl" placeholder="cat photo URL" required>
          <button type="submit">Submit</button>
        </form>
      </section>
    </main>
  </body>
</html>

```

### 你的浏览器信息：

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

### 挑战信息：

通过创建猫咪相册应用学习 HTML - 步骤 56

> **[freeCodeCamp.org](https://www.freecodecamp.org/chinese/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-56)**
>
> 免费学习编程

---

<div class="post-metadata">

**Author:** ![Teller](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/teller/32/412338_2.png) [@Teller](https://forum.freecodecamp.org/u/Teller)\
**Post date:** [July 14, 2024, 12:59am UTC](https://forum.freecodecamp.org/t/html-56/700555/2 "2024-07-14T00:59:08Z")

</div>

欢迎来到论坛 @Toto197

“Loving”这个词在浏览器中出现了两次。

请删除第一个单词“Loving”。

![image](https://global.discourse-cdn.com/freecodecamp/original/4X/4/5/0/450486b80c8215bcfbd2bdec235cad5197e721fc.png)

快乐编码

---

<div class="post-metadata">

**Author:** ![Toto197](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@Toto197](https://forum.freecodecamp.org/u/Toto197)\
**Post date:** [July 14, 2024, 7:03am UTC](https://forum.freecodecamp.org/t/html-56/700555/4 "2024-07-14T07:03:00Z")

</div>

![Notepad_InVVvObwLz](https://global.discourse-cdn.com/freecodecamp/original/4X/2/b/8/2b8b594676c13fe5c14f74b254fd47497de5c195.png)

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 8, 2025, 3:48pm UTC](https://forum.freecodecamp.org/t/html-56/700555/5 "2025-01-08T15:48:57Z")

</div>

Closed on January 8, 2025, 3:48pm UTC


