# 通过编写猫咪相册应用学习 HTML - 步骤 15

**URL:** <https://forum.freecodecamp.org/t/html-15/562974>\
**Category:** General\
**Tags:** chinese-中文\
**Created:** [October 14, 2022, 6:41am UTC](https://forum.freecodecamp.org/t/html-15/562974 "2022-10-14T06:41:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mooooonika](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@mooooonika](https://forum.freecodecamp.org/u/mooooonika)\
**Post date:** [October 14, 2022, 6:41am UTC](https://forum.freecodecamp.org/t/html-15/562974/1 "2022-10-14T06:41:47Z")

</div>

**告诉我们发生了什么：**  
在此详细描述你的问题。

**你目前的代码**

```html
<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a>.</p>
      <a href="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>
    </main>
  </body>
</html>

```

**你的浏览器信息：**

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

**挑战：** 通过编写猫咪相册应用学习 HTML - 步骤 15

**挑战的链接：**

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

---

<div class="post-metadata">

**Author:** ![miya](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/miya/32/417705_2.png) [@miya](https://forum.freecodecamp.org/u/miya)\
**Post date:** [October 14, 2022, 8:05am UTC](https://forum.freecodecamp.org/t/html-15/562974/2 "2022-10-14T08:05:47Z")

</div>

题目要求“把它变成一个链接”，就需要用到 `<a>` 标签，如下：

```auto
<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>

```

---

<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 7, 2025, 3:42pm UTC](https://forum.freecodecamp.org/t/html-15/562974/3 "2025-01-07T15:42:15Z")

</div>

Closed on January 7, 2025, 3:42pm UTC


