Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

name attribute use case html

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <h1>Radio Buttons</h1>
    <form action="/form/submit" method="post">
      <p>Select your gender:</p>
      <input type="radio" id="male" name="gender" value="male">
      <label for="male">Male</label><br>
      <input type="radio" id="female" name="gender" value="female">
      <label for="female">Female</label><br>
      <input type="radio" id="other" name="gender" value="other">
      <label for="other">Other</label>
      <br>
      <p>Select your age:</p>
      <input type="radio" id="age1" name="age" value="30">
      <label for="age1">0 - 25</label><br>
      <input type="radio" id="age2" name="age" value="60">
      <label for="age2">25 - 50</label><br>
      <input type="radio" id="age3" name="age" value="100">
      <label for="age3">50 - 80</label><br><br>
      <input type="submit" value="Submit">
    </form>
  </body>
</html>
Source by www.w3docs.com #
 
PREVIOUS NEXT
Tagged: #attribute #case #html
ADD COMMENT
Topic
Name
5+5 =