Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

Using the <label> Tag 323

12


as the page’s character set. The only time you will ever need to use these attributes is when
your form includes a file upload field (discussed a bit later) or you expect to receive data in a
different language or character set than the page. If you’re going to request a file upload, you
need to specify that the enctype is multipart/form-data. Otherwise, it’s fine to leave them
out.


That about does it for the

tag, but you’ve really only just begun. The
tag alone is just a container for the input fields that are used to gather data from users.
It indicates where the data should go and how it should be packaged. To actually gather
information, you’re going to need items called form controls.


Using the


Whenever you enter text that describes a form field, you should use the


Input ▼




Figure 12.5 shows this text control with a label assigned to it.


Output ▼


FIGURE 12.5
You can assign
labels to any form
control.



Free download pdf