|Home | Web Design Tutorials | Free Graphics | Newsletter | Products | Specials | SEO | Sound Effects | Member Perks | Member Login|
HTML Form Tutorial
Browser SupportThe 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:
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.
Check out SEO for YOU now!
Almost a NewsletterSubscribe today for exclusive website design tutorials and grab some free gifts to boot! Learn more, or subcribe below:
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 ]
Home | Web Design Tutorials | Free Graphics | Newsletter | Products | Specials | SEO | Sound Effects