HTML and CSS Reference
In-Depth Information
Figure 9.4
The contact page
Let's get started. Launch Notepad and open the contact.html file. Add a paragraph
below the <div> assigned to the content id element that says “Complete this form and
a Trillium representative will contact you.”
You are ready to configure the form area. The first XHTML in a form is the <form>
element. Place your cursor on a blank line under the paragraph you just added and type
in a <form> tag as follows:
<form>
As you read through the chapter you will find that a number of attributes can be used
with the <form> element. In your first form, we are using the minimal XHTML needed
to create the form.
To create the form control for the visitor's e-mail address to be entered, type the follow-
ing XHTML:
E-mail: <input type="text" name="CustEmail" id="CustEmail" />
<br /><br />
This places the text “E-mail:” in front of the text box used to enter the visitor's e-mail
address. The <input /> tag has a type attribute with the value of text that causes the
browser to display a text box. The name attribute assigns the name CustEmail to the
information entered into the text box (the value) and could be used by server-side
processing. The id attribute is included for forward compatibility with XHTML. Since
the <input /> tag is a self-contained tag, it needs to be closed with /> . The <br />
elements configure line breaks.
Now you are ready to add the submit button to the form. The XHTML code is as
follows:
<input type="submit" />
 
Search WWH ::




Custom Search