Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

Understanding Form and Function 317

12








The Submit button is another type of input field. The value attribute is used as the
label for the Submit button. If you leave it out, the default label will be displayed by the
browser.



When you’re naming form controls and labeling buttons, strive for
clarity and meaning. If a form is frustrating or hard to figure out,
visitors will leave your site for greener pastures!

TIP

Figure 12.1 contains a screenshot of the form with all the form elements in place.


Output ▼


At this point, you’ve created the form and it’s ready to rumble. However, if you load
it into your web browser, you’ll see that it doesn’t look all that appealing. I can vastly
improve the appearance using Cascading Style Sheets (CSS). Here’s the code for the full
page, including the style sheet:


<!DOCTYPE html>




Please Log In