Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

14. XHTML Forms: Getting Interactive > What can go in a form?

What can go in a form?

You can put just about any block element into a form, but that’s not what we really care about right now; we’re interested in the form elements that create controls in the browser. Here’s a quick rundown of all the commonly used form elements. We’re going to start with the <input> form element, which plays a lot of roles in the form’s world.

Text Input

The text <input> element is for entering one line of text. Optional attributes let you set a maximum number of characters and the width of this control.

image with no caption

Note

Notice that both of these use the same XHTML element, but with different values in their type attribute.

Submit Input

The submit <input> element creates a button that allows you to submit a form. When you click this button, the browser sends the form to the Web application for processing.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial