Survey Form - Build a Survey Form

Tell us what’s happening:

Is there a way to have two type attributes in a single label tag. Its telling me to add a type checkbox for two label tags but idk how to add two type attributes in a single tag, if that’s even possible. Can someone help me out.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Exploring Digital Habits and Preferences</title>
    <link rel="stylesheet" href="styles.css"/>
    </head>
    <body>
      <h1 id="title">Exploring Digital Habits and Preferences</h1>
      <p id="description">Please fill out this form with the required infromation</p>
      <form id="survey-form">
        <fieldset>
        <label id="name-label">Name<input type="checkbox" id="name" name="name" value="name" placeholder="Enter Your Name" required/></label><br>

        <label id="email-label">Email<input id="email" type="checkbox" name="email" value="email" placeholder="Enter Your Email" required/></label><br>

        <label id="number-label">Number<input id="number" type="number" name="number" value="number" placeholder="Enter Your Number" min="5" max="15"/></label><br>

        <label for="bio">Provide a bio:
          <textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like using my device on the beach..."></textarea>
          </label>
          <input id="submit" type="submit">

        </fieldset>
        <label for="Mobile-Computer">Do you use Mobile or Computer?</label>

        <label><input id="Mobile" type="radio" name="Mobile-Computer" value="Mobile"></label>
        <label><input id="Computer" type="radio" name="Mobile-Computer" value="Computer"></label>

<select name="Mobile-Computer" id="dropdown">
  <option value="Mobile">Mobile</option>
  <option value="Computer">Computer</option>
  </select>
/* 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/122.0.0.0 Safari/537.36 Edg/122.0.0.0

Challenge Information:

Survey Form - Build a Survey Form

I am not sure I understand, can you expand on what issue you are having?

Hi @natezisgamervu

  • Your #name should have a type of text.
  • Your #email should have a type of email.

The tests are asking that the element for each id should have a specific attribute value.

For #name, the attribute value should be text not checkbox

Happy coding