Chapter 3: Creating and Styling Web Forms

In This Chapter

arrow.png Using web forms to get information

arrow.png Creating a form

arrow.png Using CSS to style a form

Web forms enable your site to gather information from users. This chapter discusses web forms in all their glory and shows you how to both create a form and how to style it with CSS.

Using Web Forms to Get Information

With web forms, like the one shown in Figure 3-1, you can gather information from users.

9781118231340-fg020301.eps

Figure 3-1: A basic web form.

Web forms can collect anything from name and e-mail address and a message, like the one shown in Figure 3-1, to images and files from your computer. For instance, when you log in to your web-based e-mail account like Gmail, you’re filling out a form with your username and your password. Here’s a look at how you can use HTML to create web forms.

Understanding web forms

When you fill out a form, the information is sent to the web server. What exactly the web server does with the information is up to the programs running on the server. For example, when you fill out the contact form on my website, the server e-mails the ...

Get PHP, MySQL, JavaScript & HTML5 All-in-One For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.