Skip to Main Content
Head First HTML and CSS, 2nd Edition
book

Head First HTML and CSS, 2nd Edition

by Elisabeth Robson, Eric Freeman
August 2012
Beginner content levelBeginner
768 pages
18h 20m
English
O'Reilly Media, Inc.
Content preview from Head First HTML and CSS, 2nd Edition

Chapter 14. HTML Forms: Getting Interactive

image with no caption

So far all your web communication has been one-way: from your page to your visitors. Golly, wouldn’t it be nice if your visitors could talk back? That’s where HTML forms come in: once you enable your pages with forms (along with a little help from a web server), your pages are going to be able to gather customer feedback, take an online order, get the next move in an online game, or collect the votes in a “hot or not” contest. In this chapter you’re going to meet a whole team of HTML elements that work together to create web forms. You’ll also learn a bit about what goes on behind the scenes in the server to support forms, and we’ll even talk about keeping those forms stylish.

How forms work

If you use the Web at all, then you know what a form is. But you might not have really thought about what they have to do with HTML. A form is basically a web page with input fields that allows you to enter information. When the form is submitted, that information is packaged up and sent off to a web server to be processed by a server script. When the processing is done, what do you get? Another web page, of course, as a response. Let’s take a closer look at how this works:

image with no caption

How forms work in the browser

To a browser, a form is just a bit of HTML in a page. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

HTML & CSS: Design and Build Websites

HTML & CSS: Design and Build Websites

Jon Duckett

Publisher Resources

ISBN: 9781449324469Errata PageSupplemental Content