Learn HTML Forms by Building a Registration Form - Step 36

Tell us what’s happening:
My error keeps saying add the label element at the end of the third fieldset, after the existing label elements. And I put my label with the textarea elements at the end of the third fieldset right before the closing tag. Wouldn’t the end of the fieldset be right before the fieldset closing tag?
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 for="first-name">Enter Your First Name: <input id="first-name" type="text" required /></label>
        <label for="last-name">Enter Your Last Name: <input id="last-name" type="text" required /></label>
        <label for="email">Enter Your Email: <input id="email" type="email" required /></label>
        <label for="new-password">Create a New Password: <input id="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label>
      </fieldset>
      <fieldset>
        <label for="personal-account"><input id="personal-account" type="radio" name="account-type" /> Personal Account</label>
        <label for="business-account"><input id="business-account" type="radio" name="account-type" /> Business Account</label>
        <label for="terms-and-conditions">
          <input id="terms-and-conditions" 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 type="file" /></label>
        <label>Input your age (years): <input type="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>Provide a Bio:<textarea></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/105.0.0.0 Safari/537.36

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

Link to the challenge:

yes officially that is correct, but not in this case.
Because here you want the textarea to be part of the form (so it can be submitted when the user clicks the Submit button)

What do you mean by part of the form? By me placing the text within the fieldset doesn’t that make it apart of the form and it displays with the other label elements.

my bad, I didn’t notice it was actually inside the form element.
Here’s the hint you should be seeing now:

Hint

You should give the label a text of Provide a bio:

I notice that in your case the word bio is not spelled the same. Try using lowercase b.

It’s cool lol but i tried that and still getting the same hint add the label element at the end of the third fieldset, after the existing label elements.
I’ve moved the <textarea element around a few different times. Still unsure where I’m going wrong

can I see your latest attempt?

I add the label element to the top right after the fieldset opening tag and now I get the hint add the label text provide a bio:.

fieldset>
label Provide a bio: /label  textarea /textarea
fieldset

i removed the brackets so you can see how I have it. I have the opening and closing tags still around label and text area

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Move the text of the label to the right side. So start the line like this

<label><textarea></textarea>…

thanks

<fieldset>
        <label><textarea></textarea>Provide a bio:</label>

hint You should give the label a text of Provide a bio:

I’ve switched the text area elements to the front of the label and I’ve tried it at the end of the label neither is working. Still unsure where I’m going wrong

Can you show me the whole block of code currently in your browser?

 <fieldset>
        <label>Provide a bio:</label><textarea></textarea>
        <label>Upload a profile picture: <input type="file" /></label>
        <label>Input your age (years): <input type="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>

      </fieldset>

Is this what you are asking for?

Yes thanks. Can you check the instructions one more time? I think they asked for a specific placement of the new label?

yes they asked for it at the end of the fieldset and when i place it there it gives me the hint i need to nest the textarea within the label. Then I place it at the beginning of the fieldset and it says that I need to add the label text

<fieldset>
        <label>Upload a profile picture: <input type="file" /></label>
        <label>Input your age (years): <input type="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:</label><textarea></textarea>
      </fieldset>

But in your last copy you have the text on the left (and they want it on the right?)

Also the textarea must be inside the label if you recall.

 <fieldset>
        <label><textarea></textarea>Provide a bio:</label>

Did you move it back up? (It looks like it is too high still?

1 Like

i appreciate your help thanks for your time i moved it back to the end of the fieldset it worked.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.