VersionW3C//DTD HTML 3.2 Final//EN
ElementFORM
Purposefill-out or data-entry 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
action CDATA #IMPLIEDUniform Resource Locator; see RFC1808 and RFC1738; url for server-side form handler FORM cdata small eth, icelandic
enctype CDATA "application/x-www-form-urlencoded"
method( GET | POST )GETsee http specification
Content( H1 | H2 | H3 | H4 | H5 | H6 | #PCDATA | TT | I | B | U | STRIKE | BIG | SMALL | SUB | SUP | EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE | A | IMG | APPLET | FONT | BASEFONT | BR | SCRIPT | MAP | INPUT | SELECT | TEXTAREA | P | UL | OL | DIR | MENU | PRE | DL | DIV | CENTER | BLOCKQUOTE | FORM | ISINDEX | HR | TABLE | ADDRESS )* -( FORM )
End tagRequired </FORM>
Referenced in BLOCKQUOTE BODY CENTER DD DIR DIV FORM LI MENU TD TH
Example
SourceAppearance
<FORM Method="POST"
Action= "http://www.december.com/cgi-bin/formmail.secure.cgi">
<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="number" 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