|
To access the contents, click the chapter and section titles.
HTML 4.0 Sourcebook
FORM encompasses the content of an HTML fill-in form. This is the element you use to create fill-in forms containing checkboxes, radio boxes, text input windows, and buttons. Data from a FORM must be sent to server-side gateway programs for processing, since a FORM collects data, but does not process it. In general, a FORM and the server-side program handling the FORM output must be designed together so that the program understands the data being sent from the FORM. Some simple examples showing the variety of possible FORMs are shown in Figures 6.21 through 6.24. Note that FORMs do not nestyou cannot have a FORM within a FORM. The FORM element takes three main attributes. These determine where the FORM input data is to be sent (ACTION); what HTTP protocol to use when sending the data (METHOD); and the data type of the content (ENCTYPE). Figure 6.17 Document employing FONT and text highlighting elements to modify the presentation of form INPUT elements. See also Figure 6.18. <HTML><HEAD> <TITLE>Test of FONT and form INPUT Elements</TITLE> </HEAD><BODY BGCOLOR=white> <FORM ACTION=accesskey.htm> <P><B>Three buttons: (1) Normal, &nbsp; (2) Arial Font, &nbsp; (3) Bold + Arial font, &nbsp; and (4) Superscript</B></P> <INPUT TYPE=button NAME=y VALUE=Button 1> <FONT FACE=arial> <INPUT TYPE=button NAME=y VALUE=Button 2> </FONT> <FONT FACE=arial> <B><INPUT TYPE=button NAME=y VALUE=Button 3></B> </FONT> <SUP><INPUT TYPE=button NAME=y VALUE=Button 4></SUP> <BR> <BR> <INPUT TYPE=text NAME=f VALUE=12345678901234567890> ... <B>Standard Text Box</B><BR> <B><INPUT TYPE=text NAME=f VALUE=12345678901234567890></B> ... <B>Boldface</B><BR> <FONT FACE=arial SIZE=+1> <INPUT TYPE=text NAME=f VALUE=12345678901234567890></FONT> ... <B>Arial Font, SIZE=+1</B><BR> </FONT> <FONT FACE=courier new SIZE=-1> <INPUT TYPE=text NAME=f VALUE=12345678901234567890></FONT> ... <B>Courier New Font, SIZE=-1</B><BR> </FORM> </BODY> </HTML>
There are several additional attributes that provide additional functionality. All these attributes are described in the following:
Figure 6.19 Document employing CSS rules to modify the presentation of form input elements. See also Figure 6.20. <HTML><HEAD> <TITLE>CSS Rules Applied to FORM Elements</TITLE> <STYLE> .b2 {font-family: Arial; color: red} .b3 {font-family: Arial; font-weight: bold} .t2 {font-weight: bold; } .t3 {font-family: Arial; font-size: 125%;} .t4 {font-family: courier new; font-size: 75%} </STYLE> </HEAD> <BODY BGCOLOR=white> <FORM ACTION=accesskey.htm> <INPUT TYPE=button CLASS=b1 NAME=y VALUE=Button 1> <INPUT TYPE=button CLASS=b2 NAME=y VALUE=Button 2> <INPUT TYPE=button CLASS=b3 NAME=y VALUE=Button 3> <BR> <BR> <INPUT CLASS=t1 TYPE=text NAME=f VALUE=12345678901234567890> ... <B>Standard Text Box</B><BR> <INPUT CLASS=t2 TYPE=text NAME=f VALUE=12345678901234567890> ... <B>Boldface</B><BR> <INPUT CLASS=t3 TYPE=text NAME=f VALUE=12345678901234567890> ... <B>Arial Font, and bigger </B><BR> <INPUT CLASS=t4 TYPE=text NAME=f VALUE=12345678901234567890> ... <B>Courier New Font, smaller </B><BR> </FORM> </BODY></HTML>
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |