HTML - Single Field Validation

HTML by itself provides some simple components to help validate user input. These are useful in Forms that are built with HTML and can provide some simple checking such as:

It's useful to understand this basic capability first so that we know what it is that we are extending through the use of JavaScript, Java, and ActiveX controls.

ADVANTAGES:

DISADVANTAGES:


The remainder of the page demonstrates some of these components:

This text field is limited to 5 characters and will beep if the user tries to enter more:

This SELECT field will let you pick one choice from the list:

This SELECT list gives you a bigger window to see the possible choices:

This SELECT list allows you to make multiple selections. (Hold down Control while clicking to select multiple items.)

These checkboxes provide multiple choices. You can pick as many as you want:
Pepperoni. Sausage. Peppers.

These radio buttons only let you choose one:
Cash Check Charge

Source: View or Save this HTML file to obtain the HTML markups that do this validation. There are no scripts or Applets used for this page.

Previous Module Return to Project Main Page Next Module