Learn HTML Forms by Building a Registration Form - Step 34

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

I am at the section where it is telling me to nest a select element ( with option) in a label element. Inside a label element add the text how did you hear about us? And the select element should come after the text.

I have tried various combination and really stuck. Either on the wording or I am not understanding something. What I put in for the code is below.

How did you hear about us?<?option>

I keep getting message saying I should nest the select element with a label element.

Thanks for any input. I am new at coding and sometimes taking a break helps but this one I am spinning wheels. Thanks again.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <title>Registration Form</title>
    <link rel="stylesheet" href="styles.css" />
    <h1>Registration Form</h1>
    <p>Please fill out this form with the required information</p>
    <form method="post" action='https://register-demo.freecodecamp.org'>
        <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>
        <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>Upload a profile picture: <input type="file" /></label>
        <label>Input your age (years): <input type="number" min="13" max="120" /></label>
          <option><label>How did you hear about us?<select /label></option>
      <input type="submit" value="Submit" />
/* 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/ Safari/537.36

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

Link to the challenge:

Please follow all the instructions including this one:

The text should come before the select element.

[quote=“joscarproductions, post:1, topic:580237”]

<option><label>How did you hear about us?<select /label></option>

 option label How did you hear about us <select /label/option>

 <option><label>How did you hear about us?<select /label></option>` 

Thanks for the response. I did put the text before the select element which is nested in a closing label element, and it says I should nest the select element with a label element. Don’t you nest it like <select/label> and this is after the text.

Thanks you again for the response.

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 (').

please click the reset button to return the code back to its initial state.

Then look in the editor for this code:


This is the code that should be nested inside the new label element.

1 Like

Thank you for helping. I was trying to figure out how to show what I type out for the code solution but I noticed it was leaving out the html elements and I couldn’t figure out how to do the quote in the form response. Thanks again.

1 Like

Thank you hbar1st. That is what I needed was a cookie crumb. I figure it out and was over thinking it and the solution was easier than what I was typing. Thank you so much. I was stuck on that one for a few days.

1 Like

We have blurred this solution (with [spoiler][/spoiler] tags) so that users who have not completed this challenge can read the discussion in this thread without giving away the solution.

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