首页 > 代码库 > HTML Notes

HTML Notes

Label tag and input in form

<form action="">  <label for="male">Male</label> //for and id should be same  <input type="radio" name="sex" id="male" value="male"><br>  <label for="female">Female</label>  <input type="radio" name="sex" id="female" value="female"><br><br>  <input type="submit" value="Submit"></form>
View Code

 

HTML Notes