In my survey form projects , my #submit should be a descendant of #survey-form which i certainly did but my code is still not accepted please check! did

Please post your actual code.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="styles/survey-form.css">
  <title>Survey Form</title>
</head>
<body>
  <div class="container">
    <form id="survey-form">
      <h1 id= "title">Survey Form</h1>
      <p id= "description">
        please fill out the survey form below
      </p>

      <!-- Add your survey questions here -->
      <label for="name" id= "name-label">Name:</label>
      <input type="text" name="name" id= "name" placeholder="Enter your name" required>>

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


      <label for="number" id="number-label">Number:</label>
        <input type="number" id="number" name="number" placeholder="Enter a number" min="1" max="100">

  <label for="dropdown">Select an option:</label>
        <select id="dropdown" name="dropdown" required>
<option value="option1">Option 1</option>

<option value="option2">Option 2</option>
 </select>

  <label id="radio-label">Select an option from radio buttons:</label>
  
  <div>
      <input type="radio" id="radio1" name="radio-group" value="radio1" required>
<label for="radio1">Option 1</label>
<input type="radio" id="radio2" name="radio-group" value="radio2" required>


<label for="radio2">Option 2</label>
   </div>

   <label id="checkbox-label">Select several fields from checkboxes:</label>
   <input type="checkbox" id="checkbox1" name="checkbox[]" value="checkbox1">
 <label for="checkbox1">Checkbox 1</label>

 <input type="checkbox" id="checkbox2" name="checkbox[]" value="checkbox2">
  <label for="checkbox2">Checkbox 2</label>
 </div>

 <label for="comments">Additional Comments:</label>
  <textarea id="comments" name="comments" placeholder="Enter your comments">
</textarea>



      <label for="age">Age:</label>
      <input type="number" id="number" name="age" required>

      <label for="feedback">Feedback:</label>
      <textarea id="feedback" name="feedback" rows="4" required></textarea>

      <button id= "submit" type= "submit" >Submit</button>
    </form>
  </div>

  <script src="script/survey-form.js"></script>
</body>
</html>

did you get my code?

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

The issue your container class.

You wrapped the entire form inside a div with the class of container.

Remove that div and it should pass now

thank you so much.it worked …
but i’m having another problem on a new project.

you can open a new thread to ask for help with the other project

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