Tell us what’s happening:
What it says when I run a test:
// running tests You should have a label
element with an id
of number-label
. Your #number-label
should contain text that describes the input. Your #number-label
should be a descendant of #survey-form
. // tests completed.
Apologies for the messy code importing from VSCode made it worse. Its telling me to add a number-label and what not but I already have. Any help please have been stuck on this for a couple days now
Your code so far
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Survey Form</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1 id="title" class="title">Dungeon and Dragons: Code Wars</h1>
<p id="description" class="description">Welcome to the new season of D&D create your new character here!</p>
</header>
<form id="survey-form">
<div class="form-group">
<label id="name-label" for="name" class="name"> Name </label>
<input id="name" type="text" placeholder="Enter your name" class="form-control" required/>
</div>
<div class="form-group">
<label id="email-label" for="email"> Email </label>
<input id="email" type="email" placeholder="Enter your email" class="form-control" required/>
</div>
<div class="form-group">
<label id="gender-label" for="gender"> Gender </label>
<select id="dropdown" name="player-gender" class="form-control" required/>
<option disabled selected value>Choose Gender</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
</div>
<div class="form-group">
<label id="number-label" for="number"> Age (Optional) </label>
<input id="number" type="number" min="10" max="100" placeholder="Age" class="form-control"/>
</div>
<div class="form-group">
<label>Select your class</label>
<select id="dropdown" name="player-class" class="form-control" required>
<option disabled selected value>Select current role</option>
<option value="Warrior">Warrior</option>
<option value="Mage">Mage</option>
<option value="Rogue">Rogue</option>
<option value="Healer">Healer</option>
</select>
</div>
<div class="form-group">
<label>What faction do you wish to fight alongside with?</label>
<label>
<input name="user-faction" value="light-bringer" type="radio" class="input-radio"
/>Light-Bringer
</label>
<label>
<input name="user-faction" value="grim-dawn" type="radio" class="input-radio"
/>Grim-Dawn
</label>
</div>
<div class="form-group">
<label>What would you like to see added to the game? <span> (Check all that apply)</span></label>
<label>
<input name="feedback" value="world-pvp" type="checkbox" class="input-checkbox"
/> World PvP
</label>
<label>
<input name="feedback" value="housing" type="checkbox" class="input-checkbox"
/> Housing System
</label>
<label>
<input name="feedback" value="gvg" type="checkbox" class="input-checkbox"
/> Guild vs Guild
</label>
</div>
<div class="form-group">
<p> We're always open to new feedback and suggestions!</p>
<textarea
id="suggestions"
class="input-textarea"
name="suggestion"
placeholder="Suggestions here..."
></textarea>
</div>
<div class="form-group">
<button type="submit" id="submit" class="submit-button">
Submit
</button>
</div>
</form>
</body>
</html>
WARNING
The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.
You will need to take an additional step here so the code you wrote presents in an easy to read format.
Please copy/paste all the editor code showing in the challenge from where you just linked.
<div class="form-group">
<label id="gender-label" for="gender"> Gender </label>
<select id="dropdown" name="player-gender" class="form-control" required/>
<option disabled selected value>Choose Gender</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
</div>
<div class="form-group">
<label id="number-label" for="number"> Age (Optional) </label>
<input id="number" type="number" min="10" max="100" placeholder="Age" class="form-control"/>
</div>
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Challenge Information:
Survey Form - Build a Survey Form