Key Points

  • To create a form, use a two-sided <form> tag. Within it, place one or more <input> tags that define the form fields.

  • In the opening <form> tag, place a method="post" argument and an action argument that describes how the form should be processed. The most common argument is action="mailto:address" where address is a valid e-mail address. If collecting form results by using e-mail, include an enctype="text/plain" argument.

  • To create a text box, use <input type="text" name="fieldname" /> where fieldname is the unique name you assign to the text box. Optional additional arguments include size and maxlength.

  • To create a multi-line text box (a text area), use a two-sided <textarea> tag with a name argument and a number of rows and columns. ...

Get HTML and XHTML Step by Step 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.