Survey Form - Build a Survey Form

Tell us what’s happening:

All of my test have been passed successfully , only the test case for "You should have a label element with an id of name-label " is getting failed but
I have passes id in label with above mentoined value.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8"/>
    <title>survey-form.freecodecamp.rocks</title>
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>
    <h1 id="title">freeCodeCamp Survey Form</h1>
    <p id="description">Thank you for taking the time to help us improve the platform</p>
    <form id="survey-form" method="post">
      <fieldset>
        <lable id="name-label" for="name" >Name <input type="text" name="name" id="name" placeholder="Enter your name" required/></label>
        <lable id="email-label" for="email" >Eamil <input type="email" name="email" id="email" placeholder="Enter your email" required/></label>
        <lable id="number-label" for="number" >Age (optional) <input type="number" name="age" id="number" min="10" max="99" placeholder="Enter your age"required/></label>
        </fieldset>
        <fieldset>
          <legend>Select from below</legend>
        <lable for="radio-btn-1">
          <input type="radio" id="radio-btn-1" name="radio-type" class="inline" checked value="defnityly"/> Defnitly
          
        </label>
        <label for="radio-btn-2"><input type="radio" id="radio-btn-2" name="radio-type" class="inline" value="maybe"/> Maybe</label>
        <label for="dropdown">Select the role?
          <select id="dropdown" name="dropdown">
            <option value="">select any one</option>
            <option value="1">Full time job</option>
            <option value="2">Part time job</option>
            <option value="3">Others</option>
            <option value="4">Student</option>
          </select>
        </label> 
      </fieldset>
      <fieldset>
        <legend>Select Stack</legend>
        <label for="checkbox"> 
          <input type="checkbox" class="inline" value="frontend"/> Frontend
        </label>
        <label><input type="checkbox" class="inline" value="backend"/> Backend
          </label>
        <label><input type="checkbox" class="inline" value="fullstack"/> Full Stack</label>
        <label for="textarea">
          Any comments
          <textarea id="textarea" name="textarea" row="3" cols="30" placeholder="Enter your comments here..."></textarea>
        </label>
      </fieldset>
      <input type="submit" id="submit" value="Submit"/>
    </form>
  </body>
</html>
/* file: styles.css */
body{
font-family: Tahoma;
background-color: #1b1b32;
color:#fff;
width:100%;
height:100vh;
margin:0;
font-size:16px;
}
h1,p{
  text-align:center;
  margin: 1em auto;
}
form{
  width:60vw;
  margin:0 auto;
  max-width:500px;
  min-width:300px;
  padding-bottom: 2em;
}
fieldset{
  border: none;
  padding: 2em 0;
}
label{
  display:block;
  margin:0.5rem 0;
}
input,textarea,select{
  width:100%;
  min-height:2em;
  margin:10px 0 10px 0;
}
.inline{
  width:unset;
  margin: 0 0.5rem 0 0;
  vertical-align:middle;
}
textarea{
  min-height:120px;
}
input[type="submit"]{
  width:100%;
  color:#fff;
  background-color:rgb(0,127,0);
}

Your browser information:

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

Challenge Information:

Survey Form - Build a Survey Form

it’s label not lable, try that

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