typestar

A form and its wiring in HTML

The smallest useful form: where it posts, and a named field to post.

<form action="/api/search" method="get">
  <label for="q">Search snippets</label>
  <input type="search" id="q" name="q" placeholder="binary search">
  <button type="submit">Search</button>
</form>

How it works

  1. action is the destination, method the HTTP verb.
  2. Only named controls are submitted.
  3. A label tied by for makes the text click the input.

The run, in numbers

Lines
5
Characters to type
191
Tokens
50
Three-star pace
65 tpm

At the three-star pace of 65 tokens a minute, this run takes about 46 seconds.

Type this snippet

Step 1 of 3 in A form, step 1 of 25 in Forms & inputs.

Next →