Survey Form - Build a Survey Form

Tell us what’s happening:
The error associated with the code is " You should have a select field with an id of dropdown " However, I do have an id on the element of ‘dropdown’".

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html>
  <title>Survey
    <link rel="stylesheet" href="styles.css">
  </title>
  <body><h1 id="title">Survey</h1>
  <p id="description">This is a survey</p>
  <form id="survey-form">

    <input id="name" type="text" placeholder="Name" required>
    <label id="name-label" >Name</label>
    </input>

    <input type="email" id="email" placeholder="Email" required>
    <label id="email-label">Email</label>
    </input>

    <input id="number" type="number" placeholder="Number" option="0-5" min="0" max="5" required>
    <label id="number-label">Number</label>
    </input>

    <input type= "radio" value="radio"  name="choose" id="dropdown" min="1" max="5">
    <input type="radio" value="radio" name="choose" id="radio"></input>
    <input type="radio" name="choose" value="radio" id="radio"></input>
    <input type="checkbox" 
    
value="checkbox">Eggs</input>
    <input type="checkbox" value="checkbox">Sauce</input>

<select id="dropdown">
<option>Option 1</option>
<option>Option 2</option>
</select>

<textarea></textarea>
  <button id="submit">Submit</button>
  </form>
</body>

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

Your browser information:

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

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

You are missing the ‘head’ element in which you put the ‘link’ element.
The ‘title’ element is not valid (you cannot put the other element within the title element).

You have a duplicate ID radio, and ID dropdown. That is not allowed in HTML. The id attribute must be unique.

1 Like

Also, the id dropdown should only be on the single element you were asked to put it on, not multiple elements.

The id attribute value is supposed to be unique and each value should only be used with one element per value.

1 Like

Thank you! This helped clarify a lot, I appreciate the help.

1 Like

Hello.

As @lasjorg says, you can use the id once.

The code pass, but is not correct.
1.- you use id=radio twice. The same: you can use the id once
2.- you don´t need clossing tag for the input (</input>) Input elements are self-closing.
3.- as @DobarBREND says, you missed the head tags.

Grets.

1 Like

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