HTML and CSS Reference
In-Depth Information
radio input
The radio <input> element creates a
single control with several buttons,
only one of which can be selected
at any time. These are like old-time
car radio buttons; you “push” one in,
and the rest “pop out.”
The ra dio co ntrol
allows only o ne of a set
of cho ices.
All t he rad io butt ons
asso ciated with a given
set of cho ices mus t
have the sa me nam e…
<input type="radio" name="hotornot" value="hot">
<input type="radio" name="hotornot" value="not">
checkbox input
A checkbox <input> element
creates a checkbox control that can
be either checked or unchecked.
You can use multiple checkboxes
together, and if you do, you can
check as many or few as you like.
U nlike radio b utton s, a
c heckbo x allo ws zer o or
m ore o f a set of c hoices.
Related checkboxes a lso share
a common name.
Each checkbo x has a
different val ue.
<input type="checkbox" name="spice" value="Salt">
<input type="checkbox" name="spice" value="Pepper">
<input type="checkbox" name="spice" value="Garlic">
Search WWH ::




Custom Search