Harvard Extension School
CSCI E-12 Fundamentals of Web Site Development | Spring 2019

## Labels

Example 3.11 - Form Labels - Example 3.11 | <form method="get" action="https://cscie12.dce.harvard.edu/echo" enctype="application/x-www-form-urlencoded"><div> What ice cream do you like? <br/><input type="checkbox" name="icecream" id="icecream_chocolate" value="chocolate"/><label for="icecream_chocolate">Chocolate</label><br/><input type="checkbox" name="icecream" id="icecream_cpb" value="chocolate peanut butter"/><label for="icecream_cpb">Chocolate Peanut Butter</label><br/><input type="checkbox" name="icecream" id="icecream_vanilla" value="vanilla"/><label for="icecream_vanilla">Vanilla</label><br/><input type="checkbox" name="icecream" id="icecream_strawberry" value="strawberry"/><label for="icecream_strawberry">Strawberry</label><br/><input type="submit" name="action" value="Proceed"/></div></form>

- Markup
- Display

    <form method="get" action="https://cscie12.dce.harvard.edu/echo">
    <div>What ice cream do you like?<br/>
    <input type="checkbox" name="icecream" id="icecream_chocolate" value="chocolate"/><label for="icecream_chocolate">Chocolate</label><br/>
    <input type="checkbox" name="icecream" id="icecream_cpb" value="chocolate peanut butter"/><label for="icecream_cpb">Chocolate Peanut Butter</label><br/>
    <input type="checkbox" name="icecream" id="icecream_vanilla" value="vanilla"/><label for="icecream_vanilla">Vanilla</label><br/>
    <input type="checkbox" name="icecream" id="icecream_strawberry" value="strawberry"/><label for="icecream_strawberry">Strawberry</label><br/>
    <input type="submit" name="action" value="Proceed"/></div>
    </form>

What ice cream do you like?
Chocolate
Chocolate Peanut Butter
Vanilla
Strawberry

Copyright © David Heitmeyer