January 2018
Intermediate to advanced
678 pages
20h 16m
English
Earlier, we described the text control as a box that a user can enter text into. Now it’s time to dig into text control details. Here’s a template for the text control’s syntax:
<input type="text" id="text-control-identifier" placeholder="user-entry-description" size="box-width" maxlength="maximum-typed-characters">
As you can see, and as you might recall from our description of the button control, the input element is a void element, so there’s just one tag and no end tag.
The preceding text control template does not include all the attributes for a text control—just the more important ones. We’ll describe the attributes shown, plus a few others shortly, but let’s first look at an example text control code fragment:
<input ...
Read now
Unlock full access