1. http://www.siteforinfotech.com/2015/02/how-to-create-simple-form-using-html.html pdfcrowd.com
How To Create A Simple Form Using HTML?
From is a necessary element in any website or blog. Mostly
they are used to take user information for any of the purposes
like logging into the user account, creating user account,
allowing to subscribe malling list, allowing users to submit
comments and allowing users to contact website admin,
support or sales team.
Here I am going to describe "How to create a simple form
using HTML" step by step with describing what is a form and
what elements are used to create HTML form along with
complete HTML code for a form.
A form is an area that contain form elements. You must set up
a form before adding in run to the web page. To setup a form,
you need to specify two important information Method and
Action.
Method is a property tells the form how to transfer the data to
the form processor. The value for method can be 'post' or 'get'
In post method you are just posting information and method
get means that you are just going to get another page. In
almost all of the form post method is used.
Action property tells what action the form should take when
the user presses the submit button. Action is the URL to which
you are posting the information.
We have to use different HTML tags to create a form. The most
commonly used HTML tags to create a form are listed below.
2. http://www.siteforinfotech.com/2015/02/how-to-create-simple-form-using-html.html pdfcrowd.com
Different Tags for HTML Form
<INPUT> Tag: The most form tag is <INPUT> tag. The type
of INPUT is specified with the TYPE attribute. This tag doesn't
have its ending tag. The most commonly used INPUT types
are listed below:
TEXT: It is used for plain type of text input. The attributes
used in this type are NAME, VALUE, SIZE and MAXLENGTH.
Example: <INPUT TYPE="TEXT" NAME="UserName"
VALUE="Username" SIZE=16 MAXLENGTH=15>
PASSWORD: It is used for password type of text input. The
attributes used in this type are NAME, VALUE, SIZE and
MAXLENGTH.
Example: <INPUT TYPE="PASSWORD" NAME="Password"
VALUE="Password" SIZE=16 MAXLENGTH=15>
RADIO: It is used for single choice input system. The
attributes used in this type are NAME, VALUE and CHECKED
Example: <INPUT TYPE="radio" NAME="sex" VALUE="M"
CHECKED>
CHECKBOX: It is used for multiple choice input system. The
attributes used in this type are NAME and VALUE.
Example: <INPUT TYPE="checkbox" NAME="MCQ"
VALUE="M">
3. http://www.siteforinfotech.com/2015/02/how-to-create-simple-form-using-html.html pdfcrowd.com
RESET: It is used to reset values entered in a form. Value is
the attribute of RESET type of INPUT.
Example: <INPUT TYPE="reset" VALUE="Clear Form">
SUBMIT: It is used to submit values entered in a form. Value
is the attribute of SUBMIT type of INPUT.
Example: <INPUT TYPE="submit" VALUE="Submit">
<TEXTAREA> Tag: This tag is used to specify the area of the
text. This tag makes a two dimensional text area, in which
viewer can type from a short sentence to many paragraphs.
This tag has its ending tag and it is mostly used to create
comment form or contact form. The attributes in this tag are
NAME, VALUE, COLS and ROWS.
Example: <TEXTAREA NAME="Details" COLS=30
ROWS=5></TEXTAREA>
<SELECT> Tag: This tag is used to create a menu that offers
visitors a list of option to choose from. This tab has also its
ending tag. The attributes in this tag are NAME, MULTIPLE and
SIZE.
Example: <SELECT NAME="Menu" MULTIPLE
SIZE=3><OPTION>.....</SELECT>
<OPTION> Tag: It is the mini tag of <SELECT> tag. This tag
is used to define the options to choose from the drop-down
list. SELECTED is the attribute of <OPTION> Tag.
Example: <SELECT NAME="Menu" MULTIPLE
SIZE=3><OPTION SELECTED>Programming
4. http://www.siteforinfotech.com/2015/02/how-to-create-simple-form-using-html.html pdfcrowd.com
Guide<OPTION>MCQs</SELECT>
Here is a sample form to allow users to create user and
subscribe for the topics they want along with complete HTML
code and its output.
HTML Code to Create a Simple Form
<html>
<head><title>Subscription Form</title></head>
<body>
<h1 align=center>Subscription Form</h1>
<br/>
<FORM METHOD='POST' ACTION=mailto:siteforinfotech@gmail.c
<DIV>First Name:<INPUT TYPE='text' NAME='fname' VALUE='En
<DIV>Last Name:<INPUT TYPE='text' NAME='lname' VALUE='Ent
<DIV>Password:<INPUT TYPE='password' NAME='password' SIZE
<DIV>Retype Password:<INPUT TYPE='password' NAME='rpasswo
<DIV>Email:<INPUT TYPE='text' NAME='email' VALUE='Enter Y
<DIV>Sex:<INPUT TYPE='radio' NAME='sex' VALUE='M'>Male<IN
<DIV>Write About You:<TEXTAREA NAME='about' COLS=30 ROWS=
<DIV>Your Academic Level: <SELECT><OPTION>High School<OPT
<DIV>Select your Topic to Subscribe:<br/><INPUT TYPE='che
<INPUT TYPE='checkbox' NAME='topic' VALUE='T'>IT Tutorial
<INPUT TYPE='checkbox' NAME='topic' VALUE='P'>Programming
<INPUT TYPE='submit' VALUE='Submit'><INPUT TYPE='reset' V
</FORM>
</body>
</html>
Preview of the above HTML Code
5. http://www.siteforinfotech.com/2015/02/how-to-create-simple-form-using-html.html pdfcrowd.com
Subscription Form
First Name: Enter First Name
Last Name: Enter Last Name
Password:
Retype Password:
Email: Enter Your Email
Sex: Male Female
Write About You:
Your Academic Level: High School
Select your Topic to Subscribe:
Multiple Choice Questions
IT Tutorials
Programming Guide
Submit Reset
Here I have posted the HTML codes for sample only. You can
customize this form according to your requirement. You can
6. http://www.siteforinfotech.com/2015/02/how-to-create-simple-form-using-html.html pdfcrowd.com
extract and use any element to create your own form.
Related Posts:
How To Create Simple Image Slideshow Using
JavaScript ?
Image Slideshow with Navigation Buttons Using
JavaScript
How to Create JavaScript Image Slideshow with LInks
How to Display Date Format in JavaScript?
How to Create a Digital Clock in JavaScript?
What are the Different Ways to Redirect Page in
JavaScript?
How to Detect Visitor's Browser Using JavaScript?
How to make rounded corners border using CSS
How to Create Custom CSS Template for Printing
How to Create Responsive Website or Blogger
Template