Mark-up example for Checkpoint 12.4:
use of LABEL with Form controls


This code creates the example form, and highlights the use of the LABEL element:

<FIELDSET>


<LEGEND align="top">

Options Required

</LEGEND><BR>


<INPUT TYPE="CHECKBOX"

NAME="opt1" ID="opt1" VALUE="abs"><BR>

<LABEL for="opt1">>Anti-lock breaks</LABEL>


<LABEL for="opt2">Moon roof </LABEL>

<INPUT TYPE="CHECKBOX"

NAME="opt2" ID="opt2" VALUE="mr"><BR>

<INPUT TYPE="CHECKBOX"

NAME="opt3" ID="opt3" VALUE="hm">

<LABEL for="opt3">Heated mirrors</LABEL>


<LABEL for="opt4">Power windows</LABEL><BR>

<INPUT TYPE="CHECKBOX"

NAME="opt4" ID="opt4" VALUE="pw">


</FIELDSET>


Return to Example for Checkpoint 12.4
Copyright © 2000 W3C