Learn HTML Forms by Building a Registration Form - Step 37

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Registration Form</title>
  <link rel="stylesheet" href="styles.css" />
</head>
<body>
  <h1>Registration Form</h1>
  <p>Please fill out this form with the required information</p>
  <form action='https://register-demo.freecodecamp.org'>
    <fieldset>
      <label>Enter Your First Name: <input name="first-name" required /></label>
      <label>Enter Your Last Name: <input name="last-name" required /></label>
      <label>Enter Your Email: <input name="email" required /></label>
      <label>Create a New Password: <input name="password" pattern="[a-z0-5]{8,}" required /></label>
    </fieldset>
    <fieldset>
      <label><input type="radio" name="account-type" /> Personal Account</label>
      <label><input type="radio" name="account-type" /> Business Account</label>
      <label>
        <input type="checkbox" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>
      </label>
    </fieldset>
    <fieldset>
      <label>Upload a profile picture: <input file="file" /></label>
      <label>Input your age (years): <input number="number" min="13" max="120" />
      </label>
      <label>How did you hear about us?
        <select>
          <option value="">(select one)</option>
          <option value="1">freeCodeCamp News</option>
          <option value="2">freeCodeCamp YouTube Channel</option>
          <option value="3">freeCodeCamp Forum</option>
          <option value="4">Other</option>
        </select>
      </label>
      <label>Provide a bio:
        <textarea rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
      </label>
    </fieldset>
    <input type="submit" value="Submit" />
  </form>
</body>
</html>
/* file: styles.css */
body {
width: 100%;
height: 100vh;
margin: 0;
background-color: #1b1b32;
color: #f5f6f7;
}

label {
display: block;
margin: 0.5rem 0;
}

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Challenge: Learn HTML Forms by Building a Registration Form - Step 37

Link to the challenge:

I’m really having a very hard time with this portion of the assignment. I’m hung up on the submittable elements and unique name to give them. I keep getting the message to change input to email and I’ve done that before and still would get it wrong. Can someone help me with this?

you also need to define “type” attribute for them (i.e. type=“number”)

you didn’t have to assign it “specifically” for “type=text” because that’s “default” value of every “input” elements

address those points and also read those “error” message that you get, it will tell you what’s missing, happy learning :slight_smile:

I think I need more clarification. For every input element, does it need a name attribute? What about textarea? Definitely the most confused I’ve been so far…unless I’m overthinking…again!

did you try using (appropriate) “type” for “input” elements?

and for “textarea” did they ask for any use of “type” attribute in them, i wouldnt bet on it

if you need more information about “input” elements then feel free to read about them form this mdn article <input>: The Input (Form Input) element - HTML: HyperText Markup Language | MDN

happy learning :slight_smile:

Thank you much. That link helped a ton as well.