Forms

Today we talked about forms. Forms create a way for users to input information that can be collected or sent the a designated location like an email account or a server. the html elements and tags for forms are fairly extensive. Here is a list of those used in the new html 5:

http://www.w3schools.com/html5/tag_form.asp

And these are the original html 4 examples:

http://www.w3schools.com/html/html_forms.asp

When using creating forms, use the following format as an example:

<body>

<form action=”form.cgi” method=”get”>

<fieldset>

<legend>Contact Information</legend>

<ol>

<li>

<label for=”fname”>First Name</label>

<input type=”text”  id=”fname”/>

</li>

<li>

<label for=”lname”>Last Name</label>

<input type=”text”/>

</li>

<li>

<label for=”gender”>Sex</label>

<input type=”radio” value=”male”/>Male

<input type=”radio” value=”female”/>Female

<li/>

<li>

<label for=”vehicle”>What transportation do you use? </label>

<input type=”checkbox” value=”car”/>Car

<input type=”checkbox” value=”bike”/>Bike

<input type=”checkbox” value=”shoes”/>Shoes

<li/>

<li>

<textarea name=”instructions” rows=”5″ cols=”40″> Enter special instructions for the delivery

</textarea>

<li/>

<li><label for=”hometown”>Hometown</label>

<select id=”hometown”>

<option value=”Laie”>Laie</option>

<option value=”Kahuku”>Kahuku</option>

<option value=”other”>Other</option>

</ol>

</fieldset>

<input type=”submit” value=”submit”/>

</form>

</body>

Advertisements

About cruxstew

I'll update this when I get a chance.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s