Labeling form fields


show more Labeling form fields provides you with in-depth training on Web. Taught by Zoe Gillenwater as part of the Web Accessibility Principles show less
please wait ...

Labeling form fields

>> In the last movie, we learned how important it is for form elements to be labeled so that all users can know what to fill in each field and can do so without too much trouble. In this movie we'll add labels to the form in the departments page of our example site. First let's talk about the different options for form labels. They can either be implicit or explicit. Implicit labels are wrapped around the form control that they label. This keeps the HTML very simple. But the problem is that this setup is not supported in older screen readers.

It also makes it harder for you to style with CSS, as we'll see later. Explicit labels are placed separately from the form control, either before or after it, and they don't need to be right next to the form control. The connection then is made by an ID attribute on the form field itself and a for attribute with the same value for the label tag. This method is well supported and gives your more styling options with CSS, so let's use...

Labeling form fields
Video duration: 6m 9s 6h 9m Appropriate for all

Viewers:

Labeling form fields provides you with in-depth training on Web. Taught by Zoe Gillenwater as part of the Web Accessibility Principles

Subject:
Web
Author:
please wait ...