Hi. I’m almost done with project, but when I run test then error show " All your radio buttons should have a value
attribute and value." Cant find solution. Please help.
<fieldset>
<legend>Do you have home library?(required)</legend>
<div> <label for="yes"><input id="yes" type="radio" name="basic" class="inline" value="Yes" checked/>Yes</label></div>
<div><label for="no"><input id="no" type="radio" name="basic" class="inline" value="No"/>No</label></div>
</fieldset>
Hello!
When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>
) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').
Please post all your HTML.
Is that the only two radio buttons you have?
Here you go.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Personal library survey</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<h1 id="title">Personal library survey</h1>
<p id="description">This is your personal home library survey.</p>
<form id="survey-form">
<fieldset>
<label for="name" id="name-label">Enter Your First Name: <input id="name" name="first-name" type="text" placeholder="Your name here" required /></label>
<label for="last-name-label">Enter Your Last Name: <input id="last-name-label" name="last-name" type="text" placeholder="Your last name here" required /></label>
<label for="email" id="email-label">Enter Your Email: <input id="email" name="email" type="email" placeholder="Email here" required /></label>
<label for="number" id="number-label">Input your age (years): <input id="number" type="number" name="age" min="7" max="110" placeholder="Your age here"/></label>
</fieldset>
<fieldset>
<legend>Do you have home library?(required)</legend>
<div> <label for="yes"><input id="yes" type="radio" name="basic" class="inline" value="Yes" checked/>Yes</label></div>
<div><label for="no"><input id="no" type="radio" name="basic" class="inline" value="No"/>No</label></div>
</fieldset>
<fieldset>
<label for="referrer">How much books is in your library?
<select id="dropdown" name="dropdown">
<option value="">(select one)</option>
<option value="1">None</option>
<option value="1">1 - 10</option>
<option value="2">11 - 30</option>
<option value="3">31 - 50</option>
<option value="4">51 - 100</option>
<option value="5">much more</option>
</select>
</label>
</fieldset>
<fieldset>
<legend>Your favorite genre (required)</legend>
<label for="drama"><input id="drama" type="radio" name="genre-type" class="inline" checked /> Drama</label>
<label for="comedy"><input id="comedy" type="radio" name="genre-type" class="inline" />Comedy</label>
<label for="sci-fi"><input id="sci-fi" type="radio" name="genre-type" class="inline" />Sci-fi</label>
<label for="crime"><input id="crime" type="radio" name="genre-type" class="inline" />Crime</label>
<label for="kids"><input id="kids" type="radio" name="genre-type" class="inline" />Kids</label>
</fieldset>
<fieldset>
<legend>What kind of books you like?(Check all that apply)</legend>
<input id="classic" type="checkbox" name="kind" value="classic" > <label for="classic">Classic</label>
<input id="modern" type="checkbox" name="kind" value="modern" > <label for="modern">Modern</label>
<input id="asian" type="checkbox" name="kind" value="asian" > <label for="asian">Asian</label>
<input id="scandinavian" type="checkbox" name="kind" value="scandinavian" > <label for="scandinavian">Scandinavian</label>
<input id="american" type="checkbox" name="kind" value="american" > <label for="american">American</label>
<input id="european" type="checkbox" name="kind" value="european" > <label for="european">European</label>
<input id="comic" type="checkbox" name="kind" value="comic" > <label for="comic">Comic</label>
<input id="coloring" type="checkbox" name="kind" value="coloring" > <label for="coloring">Coloring</label>
<input id="other" type="checkbox" name="kind" value="other" class="inline"> <label for="other">Other</label>
<label for="coments">Coments for other kind of books.
<textarea id="coments" name="coments" rows="5" cols="30" placeholder="I like reading books upside down..."></textarea>
</label>
</fieldset>
<input id="submit" type="submit" value="Submit" />
</form>
</body>
</html>
Sorry for everyone. I find where is problem. Thanks.
system
Closed
September 13, 2024, 5:59pm
6
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.