Tell us what’s happening:
Describe your issue in detail here.
I am working through the 1st project for making a survey. I am not sure if I have mislabeled something or what but I have tried a lot of different ways to complete the final few tasks and I just cannot get them to work. I know I do not have the checkboxes in yet but it says all of these are wrong
-
Failed:You should have a
label
element with anid
ofname-label
. -
Failed:You should have a
label
element with anid
ofemail-label
. -
Failed:You should have a
label
element with anid
ofnumber-label
. -
Failed:Your
#name-label
should contain text that describes the input. -
Failed:Your
#email-label
should contain text that describes the input. -
Failed:Your
#number-label
should contain text that describes the input. -
Failed:Your
#name-label
should be a descendant of#survey-form
. -
Failed:Your
#email-label
should be a descendant of#survey-form
. -
Failed:Your
#number-label
should be a descendant of#survey-form
.
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang ="en">
<head>
<meta charset ="UTF-8">
<title>Survey Form</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1 id="title">Placeholder</h1><p id="description">Placeholder</p>
<form id="survey-form">
<fieldset>
<label for="name-label">Enter name: <input id="name" type="text" required placeholder="Enter name here"></label>
<label for="email-label">Enter email: <input id="email" type="email" required placeholder="Enter email here"></label>
<label for="number-label">Enter age: <input id="age" type="number" required min="16" max="100" placeholder="Enter age here"></label></fieldset>
<fieldset>
<label for="start coding">How did you start coding? <select id="dropdown" name="options">
<option value="0">Select one </option>
<option value="1">freeCodeCamp </option>
<option value="2"> YouTube</option>
<option value="3"> Good question</option>
</select></label></fieldset>
<fieldset>
Would you recommend coding to a friend?
<label for="friend-yes">Yes <input id="friend-yes" type="radio" class="inline" name"friend"></label>
<label for="friend-not-sure">Not sure <input id="friend-not-sure" type="radio" class="inline" name="friend"></label>
<label for="friend-no">No <input id="friend-no" type="radio" class="inline" name="friend"></label>
</fieldset>
<fieldset>
<label for="comments">Do you have any comments or questions?<textarea id="comments" name="comments" rows="4" cols="30" placeholder="Please enter comments here..."></textarea></fieldset>
<input type="submit" id="submit">
/* file: styles.css */
body {
width: 100%;
height: 100vh;
margin: 0;
background-color: #989075;
color: #000;
font-family: Tahoma;
font-size: 16px;
}
h1, p {
margin: 1em auto;
text-align: center;
}
form {
width: 60vw;
max-width: 500px;
min-width: 300px;
margin: 0 auto;
padding-bottom: 2em;
}
fieldset {
border: none;
padding: 2rem 0;
border-bottom: 3px solid white;
}
fieldset:last-of-type {
border-bottom: none;
}
label {
display: block;
margin: 0.5rem 0;
}
input,
textarea,
select {
margin: 10px 0 0 0;
width: 100%;
min-height: 2em;
}
input, textarea {
background-color: white;
border: 1px solid #807755;
color: black;
}
.inline {
width: unset;
margin: 0 0.5em 0 0;
vertical-align: middle;
}
{
color: black
}
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 Edg/115.0.1901.203
Challenge: Survey Form - Build a Survey Form
Link to the challenge: