Version-//W3C//DTD HTML 4.01//EN
ElementFORM
Purposeinteractive form
DescriptionThis element is used to create a form to collect data from users. The data is collected through elements contained in the form. Once the user indicates that they are done with the form by clicking on a button, the data is sent to a Web server for processing by a common gateway interface (CGI) program. The results of this processing are then displayed to the user.

Creating forms for your Web site requires that you can prepare a common gateway interface (CGI) program to handle the form's processing and that you have permission from your system administrator to place this program in the a special directory, typically called cgi-bin, on your server, to hold CGI scripts.

Start tagRequired <FORM>
Attributes
NameTypeDefaultComment
accept CDATA #IMPLIEDcomma-separated list of media types; list of MIME types for file upload
accept-charset CDATA #IMPLIEDa space-separated list of character encodings; list of supported charsets
action CDATA #REQUIREDUniform Resource Identifier as p er RFC2396; a Uniform Resource Locator (URL) is a URI; server-side form handler
class CDATA #IMPLIED space-separated list of classes
dir( ltr | rtl )#IMPLIEDdirection f or weak/neutral text
enctype CDATA "application/x-www-form-urlencoded" media type
idID#IMPLIEDdocument-wide unique id
lang NAME # IMPLIEDlanguage code as RFC1766; language code
method ( GET | POST )GETHTTP method used to submit the form
name CDATA #IMPLIEDname of form for scripti ng
onclick C DATA #IMPLIEDscript expression; a pointe r button was clicked
ondblclick CDATA #IMPLIEDscript expression; a pointer button was double clicked
onkeydown< td class="guide"> CDATA #IMPL IEDscript 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
onreset CDATA #IMPLIEDscript expression; the form was reset
onsubmit CDATA #IMPLIEDscript expression; the form was submitted
style CDATA #IMPLIEDstyle sheet data; associated style info
title CDATA #IMPLIEDtext; advisory title
Content( P | H1 | H2 | H3 | H4 | H5 | H6 | UL | OL | PRE | DL | DIV | NOSCRIPT | BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS | SCRIPT )+ -( FORM )
End tagRequired </FORM>
Referenced in BLOCKQUOTE BODY BUTTON DD DEL DIV FIELDSET FORM INS LI MAP NOSCRIPT OBJECT TD TH
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?

Save this page to any social bookmarking site! Share · Search · Market · Directory
2013-04-15 · John December · Contact · Terms of Use © December Communications, Inc.