SlideShare a Scribd company logo
HTML : Forms
2
• A form is an area that can contain form elements.
• Form elements are elements that allow the user to enter
information (like text fields, textarea fields, drop-down menus,
radio buttons, checkboxes, etc.) in a form.
• A form is defined with the <form> tag.
<form>
.
input elements
.
</form>
WEB PROGRAMMING : Forms
3
HTML <form> method Attribute
• The method attribute specifies how to send form-data (the form-
data is sent to the page specified in the action attribute).
• The form-data can be sent as
• URL variables (with method="get")
• or as HTTP post (with method="post").
WEB PROGRAMMING : Forms
4
Input
• The most used form tag is the <input> tag.
• The type of input is specified with the type attribute.
• The most commonly used input types are explained below:
Text Fields
• Text fields are used when you want the user to type letters, numbers,
etc. in a form.
<form>
First name:
<input type="text" name="firstname" />
<br />
Last name:
<input type="text" name="lastname" />
</form>
WEB PROGRAMMING : Forms
5
Radio Buttons
• Radio Buttons are used when you want the user to select one of a
limited number of choices.
<form>
<input type="radio" name="sex" value="male" /> Male
<br />
<input type="radio" name="sex" value="female" /> Female
</form>
WEB PROGRAMMING : Forms
6
Checkboxes
• Checkboxes are used when you want the user to select one or more
options of a limited number of choices .
<form>
I have a bike:
<input type="checkbox" name="vehicle" value="Bike" />
<br />
I have a car:
<input type="checkbox" name="vehicle" value="Car" />
<br />
I have an airplane:
<input type="checkbox" name="vehicle" value="Airplane" />
</form>
WEB PROGRAMMING : Forms
7
The Form's Action Attribute and the Submit Button
1. When the user clicks on the "Submit" button, the content of the form is
sent to the server.
2. The form's action attribute defines the name of the file to send the
content to.
3. The file defined in the action attribute usually does something with the
received input
<form name="input" action="html_form_submit.asp" method="get">
Username:
<input type="text" name="user" />
<input type="submit" value="Submit" />
</form>
WEB PROGRAMMING : Forms
8
Form Tages
WEB PROGRAMMING : Forms

More Related Content

PPTX
Forms
PPTX
Html forms
PPTX
Html forms
PPT
Forms,Frames.ppt
PPT
Forms,Frames.ppt
PPTX
unit2_HTML_Forms fundamentals of html and crore concepts.pptx
PPTX
HTML Forms Basics by Kamran Solangi.pptx
PPTX
HTML FORMS.pptx
Forms
Html forms
Html forms
Forms,Frames.ppt
Forms,Frames.ppt
unit2_HTML_Forms fundamentals of html and crore concepts.pptx
HTML Forms Basics by Kamran Solangi.pptx
HTML FORMS.pptx

Similar to HTML_Forms_.ppt (20)

PPTX
uptu web technology unit 2 html
PPTX
Lectures-web
PPTX
Form using html and java script validation
PPTX
HTML_Forms_Guide--------------- (1).pptx
PPTX
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZer
PPTX
Html form tag
PPTX
Designing web pages html forms and input
PPTX
Higher - HTML forms
PDF
CSS_Forms.pdf
PPTX
Html tables, forms and audio video
DOCX
PDF
Getting Information through HTML Forms
PPT
Web forms and html lecture Number 4
PPTX
Chapter 9: Forms
PPTX
HTML DAY 4 presentation for beginners friendly
PPTX
Web topic 20 2 html forms
PPTX
HTML frames and HTML forms
PPTX
Web topic 20 1 html forms
uptu web technology unit 2 html
Lectures-web
Form using html and java script validation
HTML_Forms_Guide--------------- (1).pptx
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZer
Html form tag
Designing web pages html forms and input
Higher - HTML forms
CSS_Forms.pdf
Html tables, forms and audio video
Getting Information through HTML Forms
Web forms and html lecture Number 4
Chapter 9: Forms
HTML DAY 4 presentation for beginners friendly
Web topic 20 2 html forms
HTML frames and HTML forms
Web topic 20 1 html forms
Ad

More from nivedita murugan (7)

PPT
Types of Memory.ppt
PPT
Number_Systems (2).ppt
PPTX
performance evaluation of parallel processors.pptx
PPT
Function Overloading.ppt
PPT
constructor.ppt
PPT
Performance of processor.ppt
PPTX
Data Representation.pptx
Types of Memory.ppt
Number_Systems (2).ppt
performance evaluation of parallel processors.pptx
Function Overloading.ppt
constructor.ppt
Performance of processor.ppt
Data Representation.pptx
Ad

Recently uploaded (20)

PPT
Project quality management in manufacturing
PDF
composite construction of structures.pdf
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Sustainable Sites - Green Building Construction
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Geodesy 1.pptx...............................................
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Project quality management in manufacturing
composite construction of structures.pdf
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Model Code of Practice - Construction Work - 21102022 .pdf
Sustainable Sites - Green Building Construction
bas. eng. economics group 4 presentation 1.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
CYBER-CRIMES AND SECURITY A guide to understanding
OOP with Java - Java Introduction (Basics)
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
R24 SURVEYING LAB MANUAL for civil enggi
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Operating System & Kernel Study Guide-1 - converted.pdf
Geodesy 1.pptx...............................................
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
CH1 Production IntroductoryConcepts.pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx

HTML_Forms_.ppt

  • 2. 2 • A form is an area that can contain form elements. • Form elements are elements that allow the user to enter information (like text fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.) in a form. • A form is defined with the <form> tag. <form> . input elements . </form> WEB PROGRAMMING : Forms
  • 3. 3 HTML <form> method Attribute • The method attribute specifies how to send form-data (the form- data is sent to the page specified in the action attribute). • The form-data can be sent as • URL variables (with method="get") • or as HTTP post (with method="post"). WEB PROGRAMMING : Forms
  • 4. 4 Input • The most used form tag is the <input> tag. • The type of input is specified with the type attribute. • The most commonly used input types are explained below: Text Fields • Text fields are used when you want the user to type letters, numbers, etc. in a form. <form> First name: <input type="text" name="firstname" /> <br /> Last name: <input type="text" name="lastname" /> </form> WEB PROGRAMMING : Forms
  • 5. 5 Radio Buttons • Radio Buttons are used when you want the user to select one of a limited number of choices. <form> <input type="radio" name="sex" value="male" /> Male <br /> <input type="radio" name="sex" value="female" /> Female </form> WEB PROGRAMMING : Forms
  • 6. 6 Checkboxes • Checkboxes are used when you want the user to select one or more options of a limited number of choices . <form> I have a bike: <input type="checkbox" name="vehicle" value="Bike" /> <br /> I have a car: <input type="checkbox" name="vehicle" value="Car" /> <br /> I have an airplane: <input type="checkbox" name="vehicle" value="Airplane" /> </form> WEB PROGRAMMING : Forms
  • 7. 7 The Form's Action Attribute and the Submit Button 1. When the user clicks on the "Submit" button, the content of the form is sent to the server. 2. The form's action attribute defines the name of the file to send the content to. 3. The file defined in the action attribute usually does something with the received input <form name="input" action="html_form_submit.asp" method="get"> Username: <input type="text" name="user" /> <input type="submit" value="Submit" /> </form> WEB PROGRAMMING : Forms