Survey Form - Build a Survey Form

Tell us what’s happening:

Describe your issue in detail here.
the test asks for:
You should have a label element with an id of name-label .

i am not sure what it means by the ‘name-label’ because i have added it

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<link rel="stylesheet" href="styles.css">
  <title>
    Social Media Survey
  </title>
  <body>
    <h1 id="title"> Social media survey </h1>
    <p id="description">
      This is a survey to understand how you use social media.
    </p>
    <form id="survey-form">
      <fieldset>
        <legend>Demographics</legend>
        <label id="name-Enter your name:">
          Enter your name:
          <input id="name" type="text"  placeholder="John Doe" required>
          </input>
        </label>
        <label id="email-Enter your email id:">Enter your email id:
          <input type="email" id="email" placeholder="john.doe@email.com" required>
          </input>
        </label>
        <label id="number-How many years have you been using social media for?">How many years have you been using social media for?
          <input type="number" id="number" min="0" max="50" placeholder="4">
          </input>
        </label>
      </fieldset>
      <fieldset>
        <label for="dropdown">What was the first social media you used?
            <select id="dropdown">
              <option value="">Select</option>
              <option value="twitter" name="T">Twitter</option>
              <option value="Myspace">MySpace</option>
              <option value="insta">Instagram</option>
              <option value="facebook">Facebook</option>
              </select>
              </input>
              </label>
        <label for="best">What is the best social media yet?
          <input id="t" value="t" name="t-i-m-f" type="radio">
          <name> Twitter </name>
          <input id="i" value="i" name="t-i-m-f" type="radio">
          <name> Instagram </name>
          <input id="m" value="m" name="t-i-m-f" type="radio">
          <name> Myspace </name>
          <input id="f" value="f" name="t-i-m-f" type="radio">
          <name> Facebook </name>
          </input>
          </label>
        <label for="current"> Which social media you use the most?
         <input type="checkbox" value="twitter">Twitter
         <input type="checkbox" value="twitter">Instagram
         <input type="checkbox" value="twitter">Myspace
         <input type="checkbox" value="twitter">Facebook
        </label> 
        <label for="comments"> Do you have any additional comments?
       <textarea></textarea>
        </label>
      
        <label for="submit"><input type="submit" id="submit"></input></label>
      </fieldset>
    </form>

  </body>
</html>
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

Survey Form - Build a Survey Form

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!

Are you sure?

<label id="name-Enter your name:">

Hi, so your syntax for label tags is wrong in your code. The correct syntax is And you have to make sure to put between those quotation marks the same naming you used for the corresponding input id.
So the idea here, is that you have to make sure the browser understands, which label belongs to which input field. By giving the same name for label for=“” and also for the input Id=“” you make this connection possible.
Now, the name-label thing is a little different. I think the purpose it serves in this exercise is to make sure your project solution can be automatically checked by running the given test cases.
The instructions tell you, to name your label to be label-id. So this means you add another attribute to your label. So eventually your label will end up having two attributes like this

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