Nesting the Select element within a Label element?

Hello fcc Support,

I am not certain of what my error is on step 30 of Building a Registration Form . Would you please look at my code and assist me to understand what I am doing wrong?

Step 30
Nest the select element within a label element with the text How did you hear about us?. The text should come before the select element.

        <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 type="file" /></label>
        <label>Input your age (years): <input type="number" min="13" max="120" />
			     How did you hear about us?<select></select></label>
          <option></option>
         <option></option>
          <option></option>
          <option></option>
          <option></option>

Check Your Code (Ctrl + Enter)
:heavy_multiplication_x: Sorry, your code does not pass. Don’t give up.

Hint
You should nest only the select element within a label element.

1 Like

I’ve edited your post 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 (’).

the select element should have its own label element, here you have added the select element inside the label for the input element

1 Like

That answered my question. Thank you for your assistance.

hi ,I would like to know how come I am doing the same what is asked of me to do by nesting the select element within the label element but nothing seem to work for some reason.

For anyone having the same issue: you need to insert the text immediately after the opening label, without any space.

2 Likes

Fixed my problem, thank you

Edit : SOLUTION REMOVED
i hope you understand because my english really bad. this is how i explained.
the select element will be inside the label.

1 Like

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

Can someone help what actually question asked?

Hey @ashok2, welcome to the forum! If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Solution removed by mod

hey @prakharsahu04

If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Mod edit : solution redacted

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.