search engine optimization articles do it yourself seo hiring search engine experts html and search engine optimization web site analysis and submission service

HTML Form Tutorial

Browser Support

Internet Explorer Firefox Opera Safari Chrome

The form tag is used to create an HTML form to collect visitor input, such as to send you an email message or to add themselves to your mailing list.

A form contains various input elements such as: text fields, checkboxes, radio-buttons, selection menus, textareas, submit buttons and more.

Forms usually pass user data to a form processing script on the server, but forms can also be configured to send email straight to your email address without the use of a special processing script.

A simple form example:

<form action="MyForm.cgi" method="get">
First Name: <input type="text" name="firstName" /><br>
Last Name: <input type="text" name="lastName" /><br>
<input type="submit" value="Submit">
</form>

That would look something like this on your web page:

First Name:

Last Name:

The form is a block level element, which means it will create an empty line above and below itself. You have to know the name and location of your server's form processing script in order to code the "action" a form should take on submission.

Because there are so many variables, you'll need to get the script name and location from your web host unless you install one yourself. Be careful to choose one that isn't vulnerable to spammers misuse if you do. Some form processing scripts aren't very secure. If your script is taken over by a spammer it could cause your site to be temporarily shut down.

Note that Forms Made Easy shows you the code you need to have an email form without the need for a form processing script, along with a lot of other great forms tricks. Based on your interest in this tutorial you may also be interested in:

This concludes the HTML Forms Tutorial.
Back | HTML Tag Chart | HTML Index | Web Design Tutorials
search engine optimization course
If you want your web site to rank high in the search engines . . . what are you going to do to get it there? Check out my search engine optmization guide, SEO for YOU: Search Engine Optimization for Ordinary Everyday People!

Check out SEO for YOU now!

Almost a Newsletter

Subscribe today for exclusive website design tutorials and grab some free gifts to boot! Learn more, or subcribe below:
Email:

First Name:

Privacy Policy

Did you know...

The member's site has about 100 standards compliant HTML and CSS tutorials, 31 handy reference charts, reprintable content, web graphics, exclusive fonts, free software, free ebooks and more? All this for less than 9 cents a day! [ Details ]
See my fancy bottom! :)