My Code is Correct, it just won't pass

Tell us what’s happening:

My code is correct, but the challenge still won’t pass.

Instructions: “You should have a select field with an id of dropdown.”

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head><link rel="stylesheet" href="styles.css">
<meta charset="UTF-8"></head>
  <h1 id="title">Title</h1>
  <p id="description">Description</p>
  <form id="survey-form">
    <label id="name-label">
    <input id="name" type="text" placeholder="Name" required>
    <label id="email-label">
    <input id="email" type="email"  placeholder="Email" required>
    <label id="number-label">Number: 
    <input name="number" id="number" type="number" placeholder="1-10" min="0" max="10">
<label id="dropdown">Dropdown: 
  <select id="dropdown" required>
  <option value="A">A</option><option value="B">B</option></select>
    <label id="radio">Radio Buttons:
    <input type="radio" name="radio-button" value="yes">
    <label id="radio">
    <input type="radio" name="radio-button" value="no">
    <label id="checkboxes">Check Boxes
    <input type="checkbox" name="checkboxes" value="1">
    <label id="checkboxes">
    <input type="checkbox" name="checkboxes" value="2">
<input id="submit" type="submit">
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:109.0) Gecko/20100101 Firefox/114.0

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

You have some syntax issues, like the fact that your labels are missing closing tags.

Malformed syntax makes it hard for the tests to understand your code.

You have multiple instances of the id “dropdown”.

You also have multiple instances of the id “radio” and “checkboxes”.

I’d pass your code through an “HTML validator” because you still have several issues.

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

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