Search notes:

HTML element input (type=radio)

<input type='radio' …> allows to select exactly one value of a list of predefined values.
<!DOCTYPE html>
<html>
<head>
  <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
  <title>Radio buttons</title>
</head>
<body>

  <form method='GET'>
    <table>
      <tr><td>Group one:</td>
          <td><input type='radio' name='group_1' value='foo' checked> Foo</td>
          <td><input type='radio' name='group_1' value='bar'        > Bar</td>
          <td><input type='radio' name='group_1' value='baz'        > Baz</td>
          <td><input type='text'  name='text_1'></td>
      </tr>
      <tr><td>Group two</td>
          <td><input type='radio' name='group_2' value='one' checked id='one'  > One</td>
          <td><input type='radio' name='group_2' value='two'         id='two'  > Two</td>
          <td><input type='radio' name='group_2' value='three'       id='three'> Three</td>
          <td><input type='text'  name='text_2'></td>
      </tr>
    </table>
    <input type='submit' value='Go'>
  </form>

</body>
</html>

Github repository about-html, path: /tags/input/type/radio.html
If the above HTML document is filled with the following values, the URL parameters will be set to ?group_1=bar&text_1=some&group_2=three&text_2=text.

See also

The HTML <input> element.

Index