Tell us what’s happening:
Upload a profile picture: Voici mon code ci-haut. Quand je soumets, on me dit: "Vous devriez ajouter un label avec le texte Upload a profile picture:". aidez-moi à détecter le problème. Merci.Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Registration Form</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<h1>Registration Form</h1>
<p>Please fill out this form with the required information</p>
<!-- User Editable Region -->
<form action="https://register-demo.freecodecamp.org" method="post">
<fieldset>
<label for="first-name">Enter Your First Name: <input id="first-name" type="text" required></label>
<label for="last-name">Enter Your Last Name: <input id="last-name" type="text" required></label>
<label for="email">Enter Your Email: <input id="email" type="email" required></label>
<label for="new-password">Create a New Password: <input id="new-password" type="password" required pattern="[a-z0-5]{8,}"></label>
</fieldset>
<fieldset>
<legend>Account type (required)</legend>
<label for="personal-account"><input id="personal-account" type="radio" name="account-type" value="personal" checked> Personal</label>
<!-- User Editable Region -->
<label for="business-account"><input id="business-account" type="radio" name="account-type" value="business"> Business</label>
</fieldset>
<fieldset></fieldset>
<a href="https://www.freecodecamp.org/news/terms-of-service/">Read our terms and conditions</a>
<label for="terms-and-conditions">
<input id="terms-and-conditions" type="checkbox" required> I accept the terms and conditions
</label>
<fieldset>
<label for="profile-picture">Upload a profile picture:
<input id="profile-picture" type="file">
</label>
</fieldset>
<input type="submit" value="Submit">
</form>
</body>
</html>
/* file: styles.css */
body {
width: 100%;
height: 100vh;
margin: 0;
background-color: #1b1b32;
color: #f5f6f7;
}
label {
display: block;
margin: 0.5rem 0;
}
/* Style général du corps */
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0; /* couleur de fond uniforme */
margin: 0;
padding: 20px;
}
/* Conteneur du formulaire */
form {
max-width: 500px;
margin: 0 auto;
background-color: #ffffff; /* fond blanc uniforme pour tout le formulaire */
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
/* Titres */
h1 {
text-align: center;
color: #333;
}
p {
text-align: center;
color: #666;
}
/* Fieldset */
fieldset {
border: 1px solid #ccc;
margin-bottom: 15px;
padding: 15px;
background-color: #fafafa; /* gris clair uniforme */
border-radius: 5px;
}
/* Legend */
legend {
font-weight: bold;
color: #333;
}
/* Labels et inputs */
label {
display: block;
margin-bottom: 10px;
color: #333;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"] {
width: 100%;
padding: 8px;
margin-top: 5px;
border: 1px solid #ccc;
border-radius: 4px;
}
/* Radio et checkbox */
input[type="radio"],
input[type="checkbox"] {
margin-right: 8px;
}
/* Bouton submit */
input[type="submit"] {
width: 100%;
padding: 10px;
background-color: #0a0a23;
color: #fff;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #333;
}
/* Lien vers conditions */
a {
display: block;
margin: 10px 0;
color: #0a0a23;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:153.0) Gecko/20100101 Firefox/153.0
Challenge Information:
Design a Registration Form - Step 28
