HTML5 Forms- Tutorial and Instructions
About HTML5 Forms: Video Lesson
About HTML5 Forms: Overview
HTML5 forms are used to collect information from people who visit your website. For example, you can use HTML5 forms to find out details about your visitors through surveys and feedback, or engage in e-commerce by selling your goods and services to people.
HTML5 forms are defined by the <form>…</form> tags and are made up of different elements used to collect data, such as text boxes and radio buttons. After a user inputs all of the form information, they submit the HTML5 form by using the “Submit” button you create within the form. What then happens with the data is a decision you will need to make. You can use a CGI script to manage the data, send the data to a database, or even receive the data via e-mail.
To begin creating an HTML5 form that uses a CGI script, start with the <form> tag, containing the command (method=“post”) and the ACTION attribute, with a value equal to the path and name of your CGI script.
|Where “?” is the path and name of your CGI script for the form.
|<form method=“post” action=“/cgi-bin/contact.pl”>
|Creates the structure of the form.
About HTML5 Forms: Instructions
- To create an HTML5 form that uses a CGI script, type the first part of the start tag at the point in the HTML5 web page where you want to insert the form: <form
- Type a space and then the attributes: method=“post” action=“?”
(where “?” is the path and name of you CGI script for the form.)
- Close the tag by typing: >
- On the next line, type the end tag: </form>