Tell us what’s happening:
Hello fellow campers !
I am in trouble with the step 9 : You should associate every input element with a label element.
It seems to me that every input/textarea has a label though… I don’t really understand. Thanks for the help
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>Job Application Form</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<form>
<label for="name">Your name</label>
<input
type="text"
id='name'
name="name"
placeholder="E.g., John Doe">
<label for="name">Your email</label>
<input
type="email"
id='email'
name="email"
placeholder="E.g., john.doe@example.com">
<label for='position'>What is your job ?</label>
<select id="position" name="position">
<option>Employee</option>
<option>Executive</option>
<option>CEO</option>
<option>Unemployed</option>
</select>
<fieldset class="radio-group">
<legend>What are your availabilities ?</legend>
<input type="radio" name="availability"
id="full-time"
>
<label for="full-time">Full time</label>
<input type="radio" name="availability"
id="part-time"
>
<label for="part-time">Part time</label>
<input type="radio" name="availability"
id="temporary"
>
<label for="temporary">Temporary</label>
</fieldset>
<label for="message">Any other message ?</label>
<textarea id="message" placeholder="Type your message here"></textarea>
<button type="submit">Submit</button>
</form>
</div>
</body>
</html>
/* file: styles.css */
body {
background-color: #00A0A9;
color: whitesmoke;
}
.container {
margin: 15px;
padding: 10px;
text-align: center;
border-radius: 10px;
background-color: #005F7B;
box-shadow: 0 10px 20px #005F7B;
}
label, input {
display: inline-block;
margin: 7px 0;
}
h2 {
margin: 5px;
}
fieldset, legend {
margin: 7px;
}
button {
background-color: #00A0A9;
border: none;
border-radius: 3px;
transition: all 0.3s ease;
}
input:focus, textarea:focus {
border: 2px solid yellow;
outline: none;
}
button:hover {
background-color: #007F7B;
transform: scale(1.2, 1.2);
}
input:valid,select:valid, textarea:valid{
border: 2px solid green
}
input:invalid,select:invalid, textarea:invalid {
border: 2px solid red
}
.radio-group input[type="radio"] {
vertical-align: middle;
}
.radio-group input[type="radio"]:checked {
border: 2px solid green;
background-color: lightgreen;
box-shadow: 0 0 10px green;
}
.radio-group input[type="radio"]:checked + label {
color: green;
}
input:first-of-type {
border-radius: 7px
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36 Edg/148.0.0.0
Challenge Information:
Build a Job Application Form - Build a Job Application Form