Sign-Up form

Recipe 9.1 Create forms

Sample:

T-Shirt size

Code:

<form>
  <div>
    <label for="username">Username</label>
    <input type="text" id="username" autocomplete="username">
  </div>

  <div>
    <label for="email">E-Mail</label>
    <input type="email" id="email" autocomplete="email">
  </div>

  <fieldset>
    <legend>T-Shirt size</legend>

    <div>
      <input type="radio" id="s" name="shirt">
      <label for="s">Small</label>
    </div>

    <div>
      <input type="radio" id="m" name="shirt">
      <label for="m">Medium</label>
    </div>

    <div>
      <input type="radio" id="l" name="shirt">
      <label for="l">Large</label>
    </div>
  </fieldset>

  <button>
    Sign up
  </button>
</form>