Skip to Content
Web Design in a Nutshell, 3rd Edition
book

Web Design in a Nutshell, 3rd Edition

by Jennifer Robbins
February 2006
Intermediate to advanced
826 pages
63h 42m
English
O'Reilly Media, Inc.
Content preview from Web Design in a Nutshell, 3rd Edition

Name

input

Synopsis

<input />

The input element is used to create a variety of form input controls. The type of control is defined by the type attribute. Following is a complete list of attributes (with descriptions) that can be used with the input element. Not all attributes can be used with all control types. The attributes associated with each control type are also provided.

Attributes

Core(id, class, style, title), Internationalization, Events (onfocus, onblur, onselect, onchange

alt=" text "

Specifies alternative text for an image used as a button.

accept=" MIME type "

Specifies a comma-separated list of content types that a server processing the form will handle correctly. It can be used to filter out nonconforming files when prompting a user to select files to send to the server.

accesskey=" character "

Assigns an access key (keyboard shortcut) to an element for quicker access.

checked="checked"

When this attribute is added, a checkbox will be checked by default.

disabled="disabled"

Disables the control for user input. It can only be altered via a script. Browsers may display disabled controls differently (grayed out, for example), which could be useful for dimming certain controls until required info is supplied.

maxlength=" number "

Specifies the maximum number of characters the user can input for this element.

name=" text "

Required by all input types exceptsubmitandreset. Assigns a name to the control. A script program uses this name to reference the control.

readonly="readonly" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Responsive Web Design with HTML5 and CSS3

Beginning Responsive Web Design with HTML5 and CSS3

Jonathan Fielding

Publisher Resources

ISBN: 0596009879Errata Page