Input forms
You have all seen them and used them and now you are going to create them: registration forms, order forms—in short: forms. What all forms have in common is that the user will enter, or input, some information. Next, that input is validated—for example, to verify that an e-mail address is actually in the correct format—and then it is processed one way or another.
The form will, of course, be written in HTML and CSS. Validation can happen on the client side before it is processed, in JavaScript, and on the server side while it is processed. The processing is, in most cases, done in PHP and the result stored in some kind of database, such as MySQL or MongoDB, or a non-database, such as a flat file, an XML file, or an Excel spreadsheet. For now, let's focus on the creation of the form itself.
Form elements
The elements we will discuss here to be used in forms are : <form>
, <label>
, <input>
, <textarea>
, <button>
, <select>
, and <option>
. We will...