Build a Survey Form - Build a Survey Form

Tell us what’s happening:

Hi. I need yours help. What is wrong in this code?
Still wrote me this errors:
28. Your #name should have a placeholder attribute and value.
29. Your #email should have a placeholder attribute and value.
30. Your #number should have a placeholder attribute and value.
Thank you for your help and answers.

Write your name Write your Email Write your Age

Your code so far

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Survey Form</title>
  </head>
<h1 id="title"> Survey form </h1>
<p id="title">Thank you for your visit</p>
<p id="description">Write me your referencion</p>
  <body>
    <main>
      <form id="survey-form">
         <fieldset>
          <legend>Personal Information</legend>
          <label for="name">Name (required):</label>
          <input id="name" name="name" required="name">
          <label for="email">Email (required):</label>
          <input id="email" name="email" required="email" type="email">
         <label for="number">Age (required):</label>
          <input id="number" name="number" required="number" type="number" number min="0" number max="10"/>
          
          
            <form id="survey-form">
  <label id="name-label"/>Write your name</label>
<input id="name-label" placeholder="Write your name" required />
  <label id="email-label"/>Write your Email</label>
<input type="email" id="email-label" placeholder="Write your Email" required />
  <label id="number-label"/>Write your Age</label>
  <input type="number" min="5" id="number-label" max="5" placeholder="Write your Age"/>
           
           
           <select name="dropdown" id="dropdown">
             <option value="satisfactory">Satisfactory</option>
            <option value="good">Good</option>
            <div>
    <input type="radio" id="huey" name="drone" value="huey" checked />
    <label for="huey">Huey</label>
  </div>
  <div>
    <input type="radio" id="dewey" name="drone" value="dewey" />
    <label for="dewey">Dewey</label>
  </div>
  <div>
    <input type="checkbox" id="scales" name="scales" checked value="scales"/>
    <label for="scales">Scales</label>
  </div>

  <div>
    <input type="checkbox" id="horns" name="horns" value="horns"/>
    <label for="horns">Horns</label>
  </div>
  <textarea id="story" name="story" rows="5" cols="33">
It was a dark and stormy night...
</textarea>
<button type="submit" id="submit">Submit</button>
            </select>
        </fieldset>
      </main>
  </body>
</html>

Your browser information:

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

Challenge Information:

Build a Survey Form - Build a Survey Form

Hi. Here is your #name input. You don’t have a placeholder attribute on it.

 <input id="name" name="name" required="name">

Same with the other input elements in the tests.

Hi there!

You were introduced to the input element’s placeholder attribute in previous lectures and worked with it again in the Hotel Feedback Form workshop. Please refer to Step 12 of the Hotel Feedback Form for an example of how the placeholder attribute is used.

Happy coding!

you have duplicated code

1 Like

I fix this code and still me write same error.

please post your updated code

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

Hi. This is my code now.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Survey Form</title>
  </head>
<h1 id="title"> Survey form </h1>
<p id="title">Thank you for your visit</p>
<p id="description">Write me your referencion</p>
  <body>
    <main>
      <form id="survey-form">
         <fieldset>
          <legend>Personal Information</legend>
        <label for="name">Name (required):</label>
          <input id="name" name="name" required="name">
          <label for="email">Email (required):</label>
          <input id="email" name="email" required="email" type="email">
          <label for="number">Age (required):</label>
          <input id="number" name="number" required="number" type="number" number min="0" number max="10"/> 
          
          
    <label id="name-label" for="name"/>Write your name</label>
<input type="text" id="#name-label" placeholder="Ex. John Doe" required/>
  <label id="email-label" for="email"/>Write your Email</label>
<input type="text" id="#email-label" placeholder="Enter your email" required/>
  <label id="number-label"/>Write your Age</label>
  <input type="text" id="#number-label" placeholder="Enter your Age" required/>
            
           
           <select name="dropdown" id="dropdown">
             <option value="satisfactory">Satisfactory</option>
            <option value="good">Good</option>
            <div>
    <input type="radio" id="huey" name="drone" value="huey" checked />
    <label for="huey">Huey</label>
  </div>
  <div>
    <input type="radio" id="dewey" name="drone" value="dewey" />
    <label for="dewey">Dewey</label>
  </div>
  <div>
    <input type="checkbox" id="scales" name="scales" checked value="scales"/>
    <label for="scales">Scales</label>
  </div>

  <div>
    <input type="checkbox" id="horns" name="horns" value="horns"/>
    <label for="horns">Horns</label>
  </div>
  <textarea id="story" name="story" rows="5" cols="33">
It was a dark and stormy night...
</textarea>
<button type="submit" id="submit">Submit</button>
            </select>
        </fieldset>
      </main>
  </body>
</html>

I’ve edited your post to improve the readability of the code. 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 (').

they are still here twice, you should have only one input for name, only one for email and so on