Lab 2: HTML Forms
Goals
After completing this lab, you should be able to
- write appropriate HTML for a form
- use appropriate input fields for different types of information
Creating a Form (75 pts)
In this lab, you'll create a form that allows users to customize a sandwich.
- In the
submissions
directory, create a file calledlab2_form.html
.As always, write the page in well-formed HTML. Also, use appropriate CSS for the page. For this assignment, you can either have the CSS embedded or as a separate file. I find it easier to have a separate file because I use the WebDeveloper tool.
For this page's style, use a sans-serif font and make sure the text is readable and well-organized. Write one style for a specific type of
input
element. Other styles are up to you, but make sure the page is readable. - Add appropriate titles and headings to the document.
- Inspired by my years as a Subway Sandwich Artist™, create a form using appropriate labels and input fields for
each of the following inputs (If you have less than four
different types of input fields, think about if there's a
more appropriate input choice.):
- (5 pts) The customer's name
- (5 pts) The type of bread: white bread, wheat bread, or roll, default white bread
- (5 pts) One "base": turkey, ham, roast beef, tuna, or veggies, no default
- (5 pts) One cheese: swiss, american, provolone, or none
- (10 pts) As many as the customer wants of condiments and veggies: mustard, mayo, oil, vinegar, lettuce, tomato, pickles, onions, hot peppers
- (5 pts) For here or to go; default is here.
- (5 pts) Customer Notes
- (5 pts) Clear and submit buttons
- Validate your HTML and CSS. Fix any problems.
- Add a link to
lab2_form.html
on your cs335 web page, under the "Submissions" heading.
Grading (75 pts)
This lab is due tonight at midnight.
- Valid CSS, adheres to specifications (10 pts)
- Valid strict XHTML, appropriate headings, layout, labeling (15 pts)
- Form inputs (45 pts)
- Link under Submissions (5 pts)