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

**URL:** <https://forum.freecodecamp.org/t/html-14/612538>\
**Category:** General\
**Tags:** chinese-中文\
**Created:** [May 27, 2023, 3:48pm UTC](https://forum.freecodecamp.org/t/html-14/612538 "2023-05-27T15:48:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![m15554106863](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/m15554106863/32/318938_2.png) [@m15554106863](https://forum.freecodecamp.org/u/m15554106863)\
**Post date:** [May 27, 2023, 3:48pm UTC](https://forum.freecodecamp.org/t/html-14/612538/1 "2023-05-27T15:48:24Z")

</div>

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

**你目前的代码**

```html
<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->

<!-- User Editable Region -->

      <p>See more <a href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>

<!-- User Editable Region -->

      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
    </main>
  </body>
</html>

```

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

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

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

**挑战的链接：**

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

---

<div class="post-metadata">

**Author:** ![lasjorg](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lasjorg/32/280761_2.png) [@lasjorg](https://forum.freecodecamp.org/u/lasjorg)\
**Post date:** [May 27, 2023, 8:57pm UTC](https://forum.freecodecamp.org/t/html-14/612538/2 "2023-05-27T20:57:05Z")

</div>

Add the `target` attribute to the `<a>` tag and set its value to `_blank`

> **[: The Anchor element - HTML: HyperText Markup Language | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)**
>
> The HTML element (or anchor element), with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a URL can address.

---

<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, 12:01pm UTC](https://forum.freecodecamp.org/t/html-14/612538/3 "2025-01-07T12:01:13Z")

</div>

Closed on January 7, 2025, 12:01pm UTC


