Survey Form - Build a Survey Form

Tell us what’s happening:

Describe your issue in detail here.

Your code so far

Sir, when i ran this code it seems like there is a problem with submit button. Can you please help to find and solve the problem. * You should have an input or button element with an id of submit.

  • Failed:Your #submit should have a type of submit.

  • Failed:Your #submit should be a descendant of #survey-form. these are the errors.
    i had tried the code given in forum, but no change

<!-- file: index.html -->
<!DOCTYPE html>
<html>
  <head>
    <title>surveyform</title>
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>
    <h1 id="title">Survey form</h1>
    <p id="description">Please fill this survey form.</p>
    <form id="survey-form">
      <label id="name-label">Enter your Name: <input id="name" type="text"name="name" placeholder="Enter your full name" required/></label><br>

    <label id="email-label">Enter your Email: <input id="email" type="email" name="email" placeholder="Enter a valid email id" required/></label><br>

    <label id="number-label">Enter a Number: <br><input id="number" type="number" name="number" min="11" max="14" placeholder="Enter your phone number" required/></label><br>

      <label>Your Features: 
        <br>
          
          <input type="checkbox" id="dancer" name="dancer" value="Dancer">
<label for="dancer">Dancer</label><br>
<input type="checkbox" id="singer" name="singer" value="Singer">
<label for="singer">Singer</label><br>
<input type="checkbox" id="other" name="other" value="Other">
<label for="other">Other</label><br>
          </label>
          <label for="dropdown">Which suit for you the most: 
            <br><select id="dropdown"> 
<option value="Student" name="dropdown">Student</option>
<option value="IT Professional" name="dropdown">IT Professional</option>
<option value="Others" name="dropdown">Others</option>
</select><br>
          <label for="radio">Do you have laptop/desktop: <br><label>
  <input type="radio" id="yes" name="radio" value="Yes">
  <label for="yes">Yes</label>
<input type="radio" id="no" name="radio" value="No">
<label for="no">No</label><br>
<label for="comments">Comments: <br>
<textarea id="comments" name="comments"><br>
  <button id="submit" type="submit" value="submit">Submit</button>
  </form>
  </body>
</html>
/* file: styles.css */
body {
  background-color: #f0ffff;
  color: #a52a2a;
  font-family: garamond;
  font-size: 20px;
  padding: 7px 5px;
  margin: 5px;
}

h1 {
  text-align: center;
  color: #800000;
}
.submit {
  background-color: #800000;
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
}
.textarea {
  width: 200px;
  height: 250px;
}

Your browser information:

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

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!

  • You should have an input or button element with an id of submit.

  • Failed:Your #submit should have a type of submit.

  • Failed:Your #submit should be a descendant of #survey-form. these are the errors displayed. i had tried the code given in solution but no change.so please help me to solve this

Try to give a space between title text Survey Form
@jilsamariya2412

1 Like

you need to close the textarea element, the closing tag is missing

2 Likes

oohh ! it solved . Thank youu…

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