SlideShare a Scribd company logo
Forms
A form is an area that can contain form elements.
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. Like
<form>
.
input elements
.
</form>
Example
<form>
First name:
<input type="text" name="firstname" />
<br />
Last name:
<input type="text" name="lastname" />
</form>
Input Elements and the INPUT tag
The most used form tag is the <input>
tag. The type of input is specified with
the type attribute.
The available types are
•Text Fields
•Radio Buttons
•Checkboxes
•Submit Buttons
•Reset Buttons
Text Fields
Text fields are used when you want the user to type
letters, numbers, etc. in a form.
Example

<form>
First name:
<input type="text" name="firstname" />
<br />
Last name:
<input type="text" name="lastname" />
</form>
Radio Buttons
Radio Buttons are used when you want the user to
select one of a limited number of choices.
Example
<form>
<input type="radio" name="sex" value="male" />
Male
<br />
<input type="radio" name="sex" value="female" />
Female
</form>
Checkboxes
Checkboxes are used when you want the user to select one or
more options of a limited number of choices.
Example

<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>
Submit Buttons
Submit buttons are used when you want the user to submit the
content of the form to the Server.
Example
<form name="input" action="html_form_submit.asp"
method="get">
Username:
<input type="text" name="user" />
<input type="submit" value="Submit" />
</form>

Note
The form's action attribute defines the name of the file to send the
content to. The file defined in the action attribute usually does
something with the received input.
Reset Buttons
Reset buttons are used when you want the user to
clear the content of the form
Example
<form name="input"
action="html_form_submit.asp" method="get">
Username:
<input type="text" name="user" />
<input type="submit" value="Submit" />
<input type=“Reset" value=“Reset" />
</form>
The Select list Element and the “SELECT” Tag
Select Lists (Drop Down lists ) are used when
you want the user to select one of a limited
number of choices.
Example
<form>
Gender
<SELECT NAME=“gender”>
<OPTION>Male
<OPTION>Female
</SELECT>
</form>

More Related Content

PPTX
Building html forms
PPTX
PPTX
Web topic 20 1 html forms
PPTX
Web topic 20 2 html forms
PPTX
Html forms
PDF
Html forms
PPSX
HTML5 - Forms
PPTX
Html form tag
Building html forms
Web topic 20 1 html forms
Web topic 20 2 html forms
Html forms
Html forms
HTML5 - Forms
Html form tag

What's hot (20)

PPTX
html forms
PPTX
HTML Forms
DOCX
PPTX
Entering User Data from a Web Page HTML Forms
PPTX
HTML Forms Tutorial
PDF
2. HTML forms
PPTX
HTML-5 New Input Types
PPTX
Html tables, forms and audio video
PPTX
html 5 new form attribute
PPTX
HTML Forms
PPTX
HTML Forms
ODP
Tut 06 (forms)
PPTX
Forms in html5
PPTX
New Form Element in HTML5
PPTX
Forms with html5 (1)
PPTX
Html forms
PPTX
Forms
PDF
[Basic HTML/CSS] 4. html - form tags
PPT
Html class-04
html forms
HTML Forms
Entering User Data from a Web Page HTML Forms
HTML Forms Tutorial
2. HTML forms
HTML-5 New Input Types
Html tables, forms and audio video
html 5 new form attribute
HTML Forms
HTML Forms
Tut 06 (forms)
Forms in html5
New Form Element in HTML5
Forms with html5 (1)
Html forms
Forms
[Basic HTML/CSS] 4. html - form tags
Html class-04
Ad

Viewers also liked (8)

DOC
Human Resource Management Strategy for Danube Ethno Village- The University o...
PPTX
Workshop 31 maart 2013 twit
PDF
Construction Progress for TechTown 1st Floor Renovation | Aug 1 - Aug 31
PPTX
Tno instrumenten ci syntens clicknl
PPTX
La naturaleza
PPTX
La Naturaleza
PPTX
La naturaleza (diapositivas)
Human Resource Management Strategy for Danube Ethno Village- The University o...
Workshop 31 maart 2013 twit
Construction Progress for TechTown 1st Floor Renovation | Aug 1 - Aug 31
Tno instrumenten ci syntens clicknl
La naturaleza
La Naturaleza
La naturaleza (diapositivas)
Ad

Similar to Lectures-web (20)

PDF
CSS_Forms.pdf
PPTX
HTML FORMS.pptx
PPTX
HYPERTEXT MARK UP LANGUAGES (HTML) FORMS
PPTX
Forms Part 1
PPTX
uptu web technology unit 2 html
PDF
COMP-10-ONLINE-FORMS Powerpoint Presentation
PPTX
unit2_HTML_Forms fundamentals of html and crore concepts.pptx
PPTX
Html forms
PPTX
HTML Forms Basics by Kamran Solangi.pptx
PDF
HTML Foundations, pt 3: Forms
PPTX
Designing web pages html forms and input
PPT
20 html-forms
PPT
05 html-forms
PPT
20-html-forms.ppt
PPT
11-html-forms.ppt
PPT
Web forms and html (lect 4)
PPT
HTML_Forms_.ppt
PPT
Forms,Frames.ppt
PPT
Forms,Frames.ppt
CSS_Forms.pdf
HTML FORMS.pptx
HYPERTEXT MARK UP LANGUAGES (HTML) FORMS
Forms Part 1
uptu web technology unit 2 html
COMP-10-ONLINE-FORMS Powerpoint Presentation
unit2_HTML_Forms fundamentals of html and crore concepts.pptx
Html forms
HTML Forms Basics by Kamran Solangi.pptx
HTML Foundations, pt 3: Forms
Designing web pages html forms and input
20 html-forms
05 html-forms
20-html-forms.ppt
11-html-forms.ppt
Web forms and html (lect 4)
HTML_Forms_.ppt
Forms,Frames.ppt
Forms,Frames.ppt

Recently uploaded (20)

PPT
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
PDF
Chalkpiece Annual Report from 2019 To 2025
PPTX
LITERATURE CASE STUDY DESIGN SEMESTER 5.pptx
PPT
UNIT I- Yarn, types, explanation, process
PPTX
6- Architecture design complete (1).pptx
PDF
Skskkxiixijsjsnwkwkaksixindndndjdjdjsjjssk
PPTX
rapid fire quiz in your house is your india.pptx
PPTX
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
PPTX
Special finishes, classification and types, explanation
PPTX
mahatma gandhi bus terminal in india Case Study.pptx
PDF
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
PDF
The Advantages of Working With a Design-Build Studio
PDF
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
PPTX
DOC-20250430-WA0014._20250714_235747_0000.pptx
PDF
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
PPTX
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
PPTX
Entrepreneur intro, origin, process, method
PDF
BRANDBOOK-Presidential Award Scheme-Kenya-2023
PPTX
EDP Competencies-types, process, explanation
PDF
Design Thinking - Module 1 - Introduction To Design Thinking - Dr. Rohan Dasg...
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
Chalkpiece Annual Report from 2019 To 2025
LITERATURE CASE STUDY DESIGN SEMESTER 5.pptx
UNIT I- Yarn, types, explanation, process
6- Architecture design complete (1).pptx
Skskkxiixijsjsnwkwkaksixindndndjdjdjsjjssk
rapid fire quiz in your house is your india.pptx
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
Special finishes, classification and types, explanation
mahatma gandhi bus terminal in india Case Study.pptx
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
The Advantages of Working With a Design-Build Studio
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
DOC-20250430-WA0014._20250714_235747_0000.pptx
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
Entrepreneur intro, origin, process, method
BRANDBOOK-Presidential Award Scheme-Kenya-2023
EDP Competencies-types, process, explanation
Design Thinking - Module 1 - Introduction To Design Thinking - Dr. Rohan Dasg...

Lectures-web

  • 1. Forms A form is an area that can contain form elements. 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.
  • 2. A form is defined with the <form> tag. Like <form> . input elements . </form> Example <form> First name: <input type="text" name="firstname" /> <br /> Last name: <input type="text" name="lastname" /> </form>
  • 3. Input Elements and the INPUT tag The most used form tag is the <input> tag. The type of input is specified with the type attribute. The available types are •Text Fields •Radio Buttons •Checkboxes •Submit Buttons •Reset Buttons
  • 4. Text Fields Text fields are used when you want the user to type letters, numbers, etc. in a form. Example <form> First name: <input type="text" name="firstname" /> <br /> Last name: <input type="text" name="lastname" /> </form>
  • 5. Radio Buttons Radio Buttons are used when you want the user to select one of a limited number of choices. Example <form> <input type="radio" name="sex" value="male" /> Male <br /> <input type="radio" name="sex" value="female" /> Female </form>
  • 6. Checkboxes Checkboxes are used when you want the user to select one or more options of a limited number of choices. Example <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>
  • 7. Submit Buttons Submit buttons are used when you want the user to submit the content of the form to the Server. Example <form name="input" action="html_form_submit.asp" method="get"> Username: <input type="text" name="user" /> <input type="submit" value="Submit" /> </form> Note The form's action attribute defines the name of the file to send the content to. The file defined in the action attribute usually does something with the received input.
  • 8. Reset Buttons Reset buttons are used when you want the user to clear the content of the form Example <form name="input" action="html_form_submit.asp" method="get"> Username: <input type="text" name="user" /> <input type="submit" value="Submit" /> <input type=“Reset" value=“Reset" /> </form>
  • 9. The Select list Element and the “SELECT” Tag Select Lists (Drop Down lists ) are used when you want the user to select one of a limited number of choices. Example <form> Gender <SELECT NAME=“gender”> <OPTION>Male <OPTION>Female </SELECT> </form>