Grouped Radio with Fieldset
HTML
Hard
2 views
Problem Description
Put difficulty radios inside fieldset with legend 'Choose level'.
Output Format
Print the HTML code.
Constraints
Use fieldset/legend.
Official Solution
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>meetcode</title>
</head>
<body>
<form action='#' method='get'>
<fieldset>
<legend>Choose level</legend>
<label><input type='radio' name='level' value='easy'> Easy</label>
<label><input type='radio' name='level' value='medium'> Medium</label>
<label><input type='radio' name='level' value='hard'> Hard</label>
</fieldset>
<button type='submit'>Apply</button>
</form>
</body>
</html>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!