Dicci cosa sta succedendo
Tutti i pulsanti di opzione dovrebbero avere un attributo value
con un valore.
Ho messo un value con un valore ma continua a non accettarlo. Perchè?
Il tuo codice fino ad ora
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<title>freeCodeCamp Survey Form</title>
<meta charset="utf-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1 id="title">freeCodeCamp Survey Form</h1>
<p id="description">Thank you for taking the time to help us improve the platform</p>
<form id="survey-form">
<field>
<label id="name-label">Name<input id="name" type="text" placeholder="Enter your name" required </label>
<label id="email-label">Email<input id="email" type="email" placeholder="Enter your email" required></label>
<label id="number-label">Age<input id="number" type="number" placeholder="Age" min="13" max="99" required></label>
<label>How did you hear about us?
<select id="dropdown">
<option value="">(select one)</option>
<option value="1">Friends</option>
<option value="2">Other</option>
</select>
</label>
<label>Would you recommend freeCodeCamp to a friend?</label>
<label><input type="radio" name="account-type" class="inline"> Yes</label>
<label><input type="radio" name="account-type" class="inline"> No</label>
<label>What would you like to see improved? (Check all that apply)</label>
<label><input type="checkbox" class="inline" value="Video"> Video</label>
<label><input type="checkbox" class="inline" value="Forum"> Forum</label>
<label><input type="checkbox" class="inline" value="Other"> Other</label>
<label>Comments or suggestions</label>
<label>
<textarea rows="3" cols="30" placeholder="Enter your comment here"></textarea>
</label>
</field>
<label type="submit"><input type="submit" value="Submit" id="submit" /></label>
</form>
</body>
</html>
/* file: styles.css */
body{
width: 100%;
height:100vh;
margin: 0;
background-color: #bb2649;
color: #1b1b32;
font-family: Apple Chancery, cursive;
}
h1{
margin: 1em auto;
text-align: center;
font-size: 30px;
}
p{
font-size: 15px;
margin: 1em auto;
text-align: center;
}
form {
width: 60vw;
max-width: 500px;
min-width: 300px;
margin: 0 auto;
}
fieldset {
border: none;
padding: 2rem 0;
border-bottom: 3px solid #3b3b4f;
}
label {
display: block;
margin: 0.5rem 0;
font-size: 25px;
}
fieldset {
border: none;
padding: 2rem 0;
border-bottom: 3px solid #3b3b4f;
}
input, select, textarea{
margin: 10px 0 0 0;
width: 100%;
min-height: 2em;
}
.inline {
width: unset;
margin: 0 0.5em 0 0;
vertical-align: middle;
}
input, textarea {
background-color: #bb3040;
border: 1px solid #ffffff;
color: #0a0a23;
}
input[type="submit"] {
display: block;
width: 60%;
margin: 1em auto;
height: 2em;
font-size: 1.1rem;
color: #0a0a23;
background-color: #bb3040;
border-color: white;
}
Informazioni del tuo browser:
Lo user agent è: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15
Sfida: Modulo di sondaggio - Crea un modulo di sondaggio
Link alla sfida: