Property "Label" <label>

Top  Previous  Next

The Sub-properties of the Label Property can be used to attach labels to the input elements

Why Define Label Properties?

Labels provide two functionalties:

1.They obtain a broader click-sensitive-area for the elements on the page. If you click on the area of a label on a web browser, it will be the same as you click on the area of the input element that the label is bind.
2.To define shortcuts to focus to the input elements.

 

Sub-properties

For

To bind the text as a label to an input element you should first assign an Id to the input element using its HTML Id Property and enter the same Id into this property.

AccessKey

If you want that the users can focus on the input element, which is linked via For property definition, using a short-cut then define a character in this property. If, for example, you define the "U" character then it will be possible to focus to the input element on the HTML Page by pressing ALT + U keys.

If the Access Key is given in upper case and if the label text contains the Access Key character in it then the character will be underlined to indicate that there is a short-cut defined for the label.

Examples:

Access Key

Label Text

Label Text Output

t

Default Team

Default Team

T

Default Team

Default Team

T

Default team

Default Team