Should only be used for tabular data
<table>
<tr>
<th>Menu Item</th>
<th>Calories</th>
<th>Fat</th>
</tr>
<tr>
<td>Chicken Noodle Soup</td>
<td>120</td>
<td>2</td>
</tr>
<tr>
<td>Caesar Salad</td>
<td>400</td>
<td>26</td>
</tr>
</table>
<td colspan="2"></td>
<td rowspan="2"></td>
<td cellpadding="30px"></td>
<td cellspacing="30px"></td>
action attribute provides the location of the file that will process the form
<form action="process.php"></form>
method attribute- specifies how the form information should be sent to the server
<form action="process.php" method="POST">..</form>
input - tag used to create single line fields
<input type="password" name= "password"
value="type your password" maxlength="10" />
INPUT ATTRIBUTES
text - creates a text input box
<input type="text"/>
search - creates a field for search
<input type="search"/>
email - field for email
<input type="email"/>
tel - creates a field for phone number input
<input type="tel"/>
url- adds a field where a users can input a website address
<input type="url"/>
password - field used for password input
<input type="password"/>
submit - creates a submit button
<input type="submit"/>
radio - allows the user to choose only one choice
<strong> What is your favorite color?</strong>
<ol>
<li><input type="radio" name="color" value="blue">blue</li>
<li><input type="radio" name="color" value="red">red</li>
<li><input type="radio" name="color" value="gray">gray</li>
</ol>
checkboxes - allows the user to make more than one choice
<strong>Choose which cleaning products you use</strong>
<ol>
<li><input type="checkbox" name="product" value="windex">windex</li>
<li><input type="checkbox" name="product" value="bleach">bleach</li>
<li><input type="checkbox" name="product" value="pledge">pledge</li>
</ol>
textarea - creates a multiline box
<textarea name="comments" rows="3" cols="5"
placeholder="use 10 words or less"></textarea>
TEXTAREA ATTRIBUTES
Select - users can make a choice via drop down menu
<strong>What Term?</strong>
<select name="term">
<option>Fall 2012</option>
<option>Spring 2013</option>
<option>Summer 2013</option>
</select>
You can make a select menu "scroll" instead of drop down by using the size attribute
The number you add for size is the number of choices that will appear before scrolling. Multiple allows users to select more than one
<strong>What Term?</strong>
<select name="term" size="3" multiple>
<option>Fall 2012</option>
<option>Spring 2013</option>
<option>Summer 2013</option>
</select>
Attaches and uploads documents
<input type="file"/>
must include an encoding type attribute in the form tag
enctype="multipart/form-data"
<form action="process.php" method="POST" enctype="multipart/form-data">
<input type="file" name="photo" size="28">
</form>
Make sure to add labels, fieldset and legend where necessary to make your forms more accessible
<label><input type="text" name="name" value="name">
First Name</label>
<label for="firstName">First Name</label>
<input type="text" name="name" value="name" id="firstName">
<fieldset>
<legend> Mailing List Signup</legend>
<label><input type="email" name="email" value="emailaddress"> Add me to your mailing list! </label>
</fieldset>
by adding the attribute required, you can add form validation to a form element
<input type="text" name="firstname" required="required"/>