Version-//W3C//DTD HTML 4.01//EN
ElementINPUT
Purposeform control
DescriptionThis element defines an input field (which can be a button, checkbox, imagemap, or text input field) used in a FORM element.
Start tagRequired <INPUT>
Attributes
NameTypeDefaultComment
accept CDATA #IMPLIEDcomma-separated list of media types; list of MIME types for file upload
accesskey CDATA #IMPLIEDa single character from ISO10646 (see RFC1815); accessibility key character
alt CDATA #IMPLIEDshort description
checked( checked )#IMPLIEDfor radio buttons and check boxes
class CDATA #IMPLIEDspace-separated list of classes
dir( ltr | rtl )#IMPLIEDdirection for weak/neutral text
disabled( disabled )#IMPLIEDunavailable in this context
idID#IMPLIEDdocument-wide unique id
ismap( ismap )#IMPLIEDuse server-side image map
lang NAME #IMPLIEDlanguage code as RFC1766; language code
maxlength NUMBER #IMPLIEDmax chars for text fields
name CDATA #IMPLIEDsubmit as part of form
onblur CDATA #IMPLIEDscript expression; the element lost the focus
onchange CDATA #IMPLIEDscript expression; the element value was changed
onclick CDATA #IMPLIEDscript expression; a pointer button was clicked
ondblclick CDATA #IMPLIEDscript expression; a pointer button was double clicked
onfocus CDATA #IMPLIEDscript expression; the element got the focus
onkeydown CDATA #IMPLIEDscript expression; a key was pressed down
onkeypress CDATA #IMPLIEDscript expression; a key was pressed and released
onkeyup CDATA #IMPLIEDscript expression; a key was released
onmousedown CDATA #IMPLIEDscript expression; a pointer button was pressed down
onmousemove CDATA #IMPLIEDscript expression; a pointer was moved within
onmouseout CDATA #IMPLIEDscript expression; a pointer was moved away
onmouseover CDATA #IMPLIEDscript expression; a pointer was moved onto
onmouseup CDATA #IMPLIEDscript expression; a pointer button was released
onselect CDATA #IMPLIEDscript expression; some text was selected
readonly( readonly )#IMPLIEDfor text and passwd
size CDATA #IMPLIEDspecific to each type of field
src CDATA #IMPLIEDUniform Resource Identifier as per RFC2396; a Uniform Resource Locator (URL) is a URI; for fields with images
style CDATA #IMPLIEDstyle sheet data; associated style info
tabindex NUMBER #IMPLIEDposition in tabbing order
title CDATA #IMPLIEDtext; advisory title
type( TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT | RESET | FILE | HIDDEN | IMAGE | BUTTON )TEXTwhat kind of widget is needed
usemap CDATA #IMPLIEDUniform Resource Identifier as per RFC2396; a Uniform Resource Locator (URL) is a URI; use client-side image map
value CDATA #IMPLIEDSpecify for radio buttons and checkboxes
ContentEMPTY
End tagForbidden
Referenced in A ABBR ACRONYM ADDRESS B BDO BIG BUTTON CAPTION CITE CODE DD DEL DFN DIV DT EM FIELDSET H1 H2 H3 H4 H5 H6 I INS KBD LABEL LEGEND LI OBJECT P PRE Q SAMP SMALL SPAN STRONG SUB SUP TD TH TT VAR
Example
SourceAppearance
<FORM Method="POST"
Action= "http://www.december.com/cgi-bin/formmail.secure.cgi">
<P><INPUT Type="hidden" Name="recipient" Value="nobody@december.com">
<p>Your Name: <INPUT Type="text" size="15" Name="user-name">
<P>Customer Number: <INPUT Type="text" size="10" Name= "customer-number">
<P>Shirt Size?
<INPUT Type="radio" Name="shirt-size" Value="S">S
<INPUT Type="radio" Name="shirt-size" Value="M">M
<INPUT Type="radio" Name="shirt-size" Value="L">L
<INPUT Type="radio" Name="shirt-size" Value="XL">XL
<P>What would you like?
<P><SELECT Name="would-like" size="2" multiple>
<OPTION>Order the product</OPTION>
<OPTION>Ask a question</OPTION>
<OPTION>Request a catalog</OPTION>
</SELECT>
<P>Your comments?<BR>
<TEXTAREA Name="comments" rows="4" cols="20"></TEXTAREA>
<P><INPUT Type="submit" Value="Send">
<INPUT Type="reset" Value="Cancel">
</FORM>

Your Name:

Customer Number:

Shirt Size? S M L XL

What would you like?

Your comments?

search Search · star Market
2023-06-19 · John December · Terms © johndecember.com