O'Reilly logo

Sams Teach Yourself HTML5 in 10 Minutes by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 4. Web Form Controls

HTML has always supported form controls using the <input> element, such as text boxes:

<input name="text" type="text">

or radio buttons:

<input name="radio" type="radio">

You create such controls using the <input> element with the type attribute set to the type of control you want (check box, radio button, text field), and the name attribute set to the name of the control as you’ll reference it in code (in a scripting language like JavaScript or a server-side language like PHP).

HTML5 extends the number of form controls available to you, adding such controls as a date-time picker and a numeric range control. Those new controls are the focus of this lesson.

We’ll also create an example in this lesson, webforms.html, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required