Skip to Content
Web Design in a Nutshell, 3rd Edition
book

Web Design in a Nutshell, 3rd Edition

by Jennifer Robbins
February 2006
Intermediate to advanced
826 pages
63h 42m
English
O'Reilly Media, Inc.
Content preview from Web Design in a Nutshell, 3rd Edition

Name

label

Synopsis

<label>...</label>

Used to attach information to controls. Each label element is associated with exactly one form control. The label element may contain the form control, or it may use the for attribute to identify the control by its id value.

Attributes

Core(id, class, style, title), Internationalization, Events, onfocus, onblur

accesskey=" character "

Assigns an access key (keyboard shortcut) to an element for quicker access.

for=" text "

Explicitly associates the label with the control by matching the value of the for attribute with the value of the id attribute within the control element.

Example

<label>No thanks <input type="checkbox" name="list" value="no" /></label>

<label for="lastname">Last Name: </label>
<input type="text" id="lastname" size="32" />
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Responsive Web Design with HTML5 and CSS3

Beginning Responsive Web Design with HTML5 and CSS3

Jonathan Fielding

Publisher Resources

ISBN: 0596009879Errata Page