04.06.2013 Views

Head First HTML with CSS

Head First HTML with CSS

Head First HTML with CSS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Adding the checkboxes and text area<br />

You know the drill: look over the new X<strong>HTML</strong> and add<br />

it to your “form.html”.<br />

<br />

Choose your beans:<br />

<br />

<br />

House Blend<br />

Shade Grown Bolivia Supremo<br />

Organic Guatemala<br />

Kenya<br />

<br />

Type: <br />

<br />

Whole bean <br />

Ground<br />

xhtml forms<br />

Extras: <br />

Gift wrap <br />

Include<br />

catalog <strong>with</strong> order<br />

<br />

Ship to: <br />

Name: <br />

Address: <br />

City: <br />

State: <br />

Zip: <br />

Customer Comments: <br />

<br />

<br />

<br />

<br />

<br />

<br />

Here we’ve added a checkbox for each<br />

option. Notice that these share the<br />

same name, “extras[]”...<br />

Here’s the<br />

text area.<br />

...but have<br />

different values.<br />

We’re using the checked<br />

attribute to specify that<br />

the catalog option should<br />

be checked by default.<br />

You can add a checked<br />

attribute to more than<br />

one checkbox.<br />

We’ve specified that we want it to be 10<br />

characters high and 48 characters wide.<br />

Like the radio<br />

buttons, we’ve<br />

put these<br />

labels to the<br />

right of the<br />

checkboxes.<br />

you are here 615

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!