HTML and CSS Reference
Figure 5-12 A <select> element with multiple <option> and <optgroup> elements, as displayed in Google Chrome.
So far, you have learned how you can gather text from a user and how you can create drop-down menus and radio
buttons to restrict input values. Now it's time to look at how you can enable users to upload files. For this task, you
use yet another type for the <input> element: file .
The file Input Type
The file input type displays a button that launches a file browser so that users can select a file from their hard
drive to upload to your website. An example of a file input in its simplest form is shown in the following code ex-
<input name=”avatar” type=”file”>
Figure 5-13 shows the file browser displayed in Mac OS X.