Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>The label form attribute</h1> <p>The label for the first radio button is outside the form, but still a part of the form. Try to click the "HTML" text label to select the "HTML" radio button.</p> <form action="/action_page.php" id="form1"> <input type="radio" id="html" name="fav_language" value="HTML"><br> <input type="radio" id="css" name="fav_language" value="CSS"> <label for="css">CSS</label><br> <input type="radio" id="javascript" name="fav_language" value="JavaScript"> <label for="javascript">JavaScript</label><br><br> <input type="submit" value="Submit"> </form> <label form="form1" for="html">HTML</label> </body> </html>