# 通过编写小测验学习无障碍 - Step 14

**URL:** <https://forum.freecodecamp.org/t/step-14/560282>\
**Category:** General\
**Created:** [October 4, 2022, 11:29pm UTC](https://forum.freecodecamp.org/t/step-14/560282 "2022-10-04T23:29:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wjx915](https://avatars.discourse-cdn.com/v4/letter/w/8dc957/32.png) [@wjx915](https://forum.freecodecamp.org/u/wjx915)\
**Post date:** [October 4, 2022, 11:29pm UTC](https://forum.freecodecamp.org/t/step-14/560282/1 "2022-10-04T23:29:04Z")

</div>

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

You should give the `action` attribute a value of `https://freecodecamp.org/practice-project/accessibility-quiz` . 不知怎么弄了 …

**你目前的代码**

```html
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
    <title>Accessibility Quiz</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <header>
      <img id="logo" src="https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg">
      <h1>HTML/CSS Quiz</h1>
      <nav>
        <ul>
          <li><a>INFO</a></li>
          <li><a>HTML</a></li>
          <li><a>CSS</a></li>
        </ul>
      </nav>
    </header>
    <main>
   <form >   
<section></section>
<section></section>
<section></section>
<action="https://freecodecamp.org/practice-project/accessibility-quiz">
   </form>
    </main>
  </body>
</html>

```

```css
/* file: styles.css */
body {
  background: #f5f6f7;
  color: #1b1b32;
  font-family: Helvetica;
  margin: 0;
}

header {
  width: 100%;
  height: 50px;
  background-color: #1b1b32;
  display: flex;
}

#logo {
  width: max(100px, 18vw);
  background-color: #0a0a23;
  aspect-ratio: 35 / 4;
  padding: 0.4rem;
}

h1 {
  color: #f1be32;
  font-size: min(5vw, 1.2em);
}

nav {
  width: 50%;
  max-width: 300px;
  height: 50px;
}

nav > ul {
  display: flex;
  justify-content: space-evenly;
}

```

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

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

**挑战：** 通过编写小测验学习无障碍 - Step 14

**挑战的链接：**

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

---

<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 5, 2022, 1:59am UTC](https://forum.freecodecamp.org/t/step-14/560282/2 "2022-10-05T01:59:35Z")

</div>

> [@wjx915](#):
>
> ```auto
> <form >   
> <section></section>
> <section></section>
> <section></section>
> <action="https://freecodecamp.org/practice-project/accessibility-quiz">
> </form>
> 
> ```

题目要求添加三个 section 元素，这个你做对了。然后题目要求表单提交到一个链接，使用 action 是对的，但是应该放在 form 元素中，并使用合适的方法。

```auto
<form action="https://freecodecamp.org/practice-project/accessibility-quiz" method="post"> 

```

关于 post 方法的用法，你可以看看这两个链接：

> **[发送表单数据 - 学习 Web 开发 | MDN](https://developer.mozilla.org/zh-CN/docs/Learn/Forms/Sending_and_retrieving_form_data)**
>
> 本文将讨论当用户提交表单时发生了什么——数据去了哪，以及当它到达时该如何处理？我们还研究了与发送表单数据相关的一些安全问题。

> **[HTTP 请求方法——用代码示例解释 Get vs Put vs Post](https://www.freecodecamp.org/chinese/news/http-request-methods-explained/)**
>
> 原文：HTTP Request Methods – Get vs Put vs Post Explained with Code Examples \[https://www.freecodecamp.org/news/http-request-methods-explained/\]，作者：Camila Ramos Garzon \[https://www.freecodecamp.org/news/author/camiinthisthang/\] 在本文中，我们将讨论 get、put 和 post...

---

<div class="post-metadata">

**Author:** ![wjx915](https://avatars.discourse-cdn.com/v4/letter/w/8dc957/32.png) [@wjx915](https://forum.freecodecamp.org/u/wjx915)\
**Post date:** [October 5, 2022, 7:06am UTC](https://forum.freecodecamp.org/t/step-14/560282/3 "2022-10-05T07:06:30Z")

</div>

还是不行啊 我的老师 ! 按照老师说的做了 没有成功 .

---

<div class="post-metadata">

**Author:** ![lioyo](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lioyo/32/243128_2.png) [@lioyo](https://forum.freecodecamp.org/u/lioyo)\
**Post date:** [October 5, 2022, 2:40pm UTC](https://forum.freecodecamp.org/t/step-14/560282/4 "2022-10-05T14:40:56Z")

</div>

我按照老师说的做，并无不妥。  
可能是你忽略了一些细节，你可以把你修改后的代码粘贴出来，方便大家帮你查漏补缺。

---

<div class="post-metadata">

**Author:** ![wjx915](https://avatars.discourse-cdn.com/v4/letter/w/8dc957/32.png) [@wjx915](https://forum.freecodecamp.org/u/wjx915)\
**Post date:** [October 6, 2022, 7:22am UTC](https://forum.freecodecamp.org/t/step-14/560282/5 "2022-10-06T07:22:12Z")

</div>

刷新一下通过了谢谢各位老师我会继续努力的

---

<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/step-14/560282/6 "2025-01-07T15:42:19Z")

</div>

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


