SlideShare a Scribd company logo
HTML Forms
Ravinder Kamboj
Assistant Professor
LCET, Katani Kalan
HTML Forms
• HTML Forms are required when you want to
collect some data from the site visitor.
• For example during user registration you would
like to collect information such as name, email
address, credit card, etc.
• A form will take input from the site visitor and
then will post it to a back-end application such as
CGI, ASP Script or PHP script etc.
• The back-end application will perform required
processing on the passed data based on defined
business logic inside the application.
Elements in forms
• There are various form elements available like:
• Text fields
• Textarea fields
• Drop-down menus
• Radio buttons
• Checkboxes
• etc.
Syntax
• The HTML <form> tag is used to create an
HTML form and it has following syntax:
<form action="Script URL“
method="GET|POST">
form elements like input, textarea etc.
</form>
Form Attributes
HTML Form Controls
• There are different types of form controls that
you can use to collect data using HTML form:
– Text Input Controls
– Checkboxes Controls
– Radio Box Controls
– Select Box Controls
– File Select boxes
– Hidden ControlsClickable Buttons
– Submit and Reset Button
Text Input Controls
• There are three types of text input used on forms:
– Single-line text input controls - This control is used for
items that require only one line of user input, such as
search boxes or names. They are created using HTML
<input> tag.
– Password input controls - This is also a single-line text
input but it masks the character as soon as a user enters it.
They are also created using HTMl <input> tag.
– Multi-line text input controls - This is used when the user
is required to give details that may be longer than a single
sentence. Multi-line input controls are created using HTML
<textarea> tag.
Single-line text input controls
• This control is used for items that require only one line of user input, such
as search boxes or names. They are created using HTML <input> tag.
<html>
<head>
<title>Text Input Control</title>
</head>
<body>
<form >
First name: <input type="text" name="first_name" />
<br>
Last name: <input type="text" name="last_name" />
</form>
</body>
</html>
Attributes for text
Password input controls
• This is also a single-line text input but it masks the character as
soon as a user enters it.
• They are also created using HTML <input> tag but type
attribute is set to password.
<html>
<head>
<title>Password Input Control</title>
</head>
<body>
<form >
User ID : <input type="text" name="user_id" />
<br>
Password: <input type="password" name="password" />
</form>
</body>
</html>
Multiple-Line Text Input Controls
• This is used when the user is required to give
details that may be longer than a single
sentence.
• Multi-line input controls are created using
HTML <textarea> tag.
Example
<html>
<head>
<title>Multiple-Line Input Control</title>
</head><body>
<form>
Description : <br />
<textarea rows="5" cols="50" name="description">
Enter description here...
</textarea>
</form>
</body>
</html>
Attributes of textarea
• Following is the list of attributes for
<textarea> tag.
Checkbox Control
• Checkboxes are used when more than one
option is required to be selected.
• They are also created using HTML <input> tag
but type attribute is set to checkbox.
• Attributes of <checkbox> tag:
Example
<html>
<head>
<title>Checkbox Control</title>
</head>
<body>
<form>
<input type="checkbox" name="maths" value="on"> Maths
<input type="checkbox" name="physics" value="on"> Physics
</form>
</body>
</html>
Radio Button Control
• Radio buttons are used when out of many
options, just one option is required to be
selected.
• They are also created using HTML <input> tag
but type attribute is set to radio.
Example
<html>
<head>
<title>Radio Box Control</title>
</head>
<body>
<form>
<input type="radio" name="subject" value="maths"> Maths
<input type="radio" name="subject" value="physics"> Physics
</form>
</body>
</html>
Attributes
• Following is the list of attributes for radio
button:
Select Box Control
• A select box, also called drop down box which provides option to
list down various options in the form of drop down list, from
where a user can select one or more options.
<html>
<head>
<title>Select Box Control</title>
</head>
<body>
<form>
<select name="dropdown">
<option value="Maths" selected>Maths</option>
<option value="Physics">Physics</option>
</select>
</form>
</body>
</html>
Attributes of select
File Upload Box
• If you want to allow a user to upload a file to
your web site, you will need to use a file
upload box, also known as a file select box.
• This is also created using the <input> element
but type attribute is set to file.
Example
<html>
<head>
<title>File Upload Box</title>
</head>
<body><form>
Select file:
<input type="file" name="fileupload" accept="image/*" />
</form>
</body>
</html>
Attributes of file upload
Button Controls
• There are various ways in HTML to create
clickable buttons.
• You can also create a clickable button using
<input> tag by setting its type attribute to
button.
• The type attribute can take the following
• values:
Values
Example
<html>
<head>
<title>Buttons</title>
</head>
<body>
<form>
<input type="submit" name="submit" value="Submit" />
<input type="reset" name="reset" value="Reset" />
<input type="button" name="ok" value="OK" />
<input type="image" name="imagebutton" src="images/logo.jpg" />
</form>
</body>
</html>
Hidden Form Controls
• Hidden form controls are used to hide data
inside the page which later on can be pushed
to the server.
• This control hides inside the code and does
not appear on the actual page.
Example
<html>
<head>
<title>File Upload Box</title>
</head>
<body>
<form>
<p>This is page 10</p>
<input type="hidden" name="pagename" value="10" />
<input type="submit" name="submit" value="Submit" />
<input type="reset" name="reset" value="Reset" />
</form>
</body>
</html>
Ad

More Related Content

What's hot (20)

html-table
html-tablehtml-table
html-table
Dhirendra Chauhan
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
WordPress Memphis
 
Html coding
Html codingHtml coding
Html coding
Briana VanBuskirk
 
JavaScript - Chapter 8 - Objects
 JavaScript - Chapter 8 - Objects JavaScript - Chapter 8 - Objects
JavaScript - Chapter 8 - Objects
WebStackAcademy
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
Salman Memon
 
HTML5 - Forms
HTML5 - FormsHTML5 - Forms
HTML5 - Forms
tina1357
 
HTML practical file
HTML practical fileHTML practical file
HTML practical file
Kuldeep Sharma
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events
WebStackAcademy
 
Html form tag
Html form tagHtml form tag
Html form tag
shreyachougule
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
Gil Fink
 
Learn html Basics
Learn html BasicsLearn html Basics
Learn html Basics
McSoftsis
 
Div tag presentation
Div tag presentationDiv tag presentation
Div tag presentation
alyssa_lum11
 
Dom(document object model)
Dom(document object model)Dom(document object model)
Dom(document object model)
Partnered Health
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScript
ShahDhruv21
 
CSS
CSSCSS
CSS
People Strategists
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
Andres Baravalle
 
javascript objects
javascript objectsjavascript objects
javascript objects
Vijay Kalyan
 
Javascript
JavascriptJavascript
Javascript
Manav Prasad
 
Html Ppt
Html PptHtml Ppt
Html Ppt
vijayanit
 

Viewers also liked (20)

2. HTML forms
2. HTML forms2. HTML forms
2. HTML forms
Pavle Đorđević
 
Html forms
Html formsHtml forms
Html forms
eShikshak
 
Html forms
Html formsHtml forms
Html forms
nobel mujuji
 
[Basic HTML/CSS] 4. html - form tags
[Basic HTML/CSS] 4. html - form tags[Basic HTML/CSS] 4. html - form tags
[Basic HTML/CSS] 4. html - form tags
Hyejin Oh
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
Nisa Soomro
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
Doncho Minkov
 
Creating User Friendly Joomla! Websites and Forms | Joomla! Day Deutschland
Creating User Friendly Joomla! Websites and Forms | Joomla! Day DeutschlandCreating User Friendly Joomla! Websites and Forms | Joomla! Day Deutschland
Creating User Friendly Joomla! Websites and Forms | Joomla! Day Deutschland
ThemePartner
 
Web Engineering - Web Application Testing
Web Engineering - Web Application TestingWeb Engineering - Web Application Testing
Web Engineering - Web Application Testing
Nosheen Qamar
 
Web engineering - Measuring Effort Prediction Power and Accuracy
Web engineering - Measuring Effort Prediction Power and AccuracyWeb engineering - Measuring Effort Prediction Power and Accuracy
Web engineering - Measuring Effort Prediction Power and Accuracy
Nosheen Qamar
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
Marlon Jamera
 
Web engineering - An overview about HTML
Web engineering -  An overview about HTMLWeb engineering -  An overview about HTML
Web engineering - An overview about HTML
Nosheen Qamar
 
Web Engineering - Introduction to CSS
Web Engineering - Introduction to CSSWeb Engineering - Introduction to CSS
Web Engineering - Introduction to CSS
Nosheen Qamar
 
PROGRESS - CSS BASIC
PROGRESS - CSS BASICPROGRESS - CSS BASIC
PROGRESS - CSS BASIC
UKM PROGRESS
 
Web engineering - HTML Form
Web engineering -  HTML FormWeb engineering -  HTML Form
Web engineering - HTML Form
Nosheen Qamar
 
Need for Web Engineering
Need for Web EngineeringNeed for Web Engineering
Need for Web Engineering
Nosheen Qamar
 
Angular js for beginners
Angular js for beginnersAngular js for beginners
Angular js for beginners
Munir Hoque
 
[Basic HTML/CSS] 3. html - table tags
[Basic HTML/CSS] 3. html - table tags[Basic HTML/CSS] 3. html - table tags
[Basic HTML/CSS] 3. html - table tags
Hyejin Oh
 
Web Engineering - Basic CSS Properties
Web Engineering - Basic CSS PropertiesWeb Engineering - Basic CSS Properties
Web Engineering - Basic CSS Properties
Nosheen Qamar
 
Web engineering lecture 1
Web engineering lecture 1Web engineering lecture 1
Web engineering lecture 1
University of Swat
 
Java script basics
Java script basicsJava script basics
Java script basics
Shrivardhan Limbkar
 
[Basic HTML/CSS] 4. html - form tags
[Basic HTML/CSS] 4. html - form tags[Basic HTML/CSS] 4. html - form tags
[Basic HTML/CSS] 4. html - form tags
Hyejin Oh
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
Doncho Minkov
 
Creating User Friendly Joomla! Websites and Forms | Joomla! Day Deutschland
Creating User Friendly Joomla! Websites and Forms | Joomla! Day DeutschlandCreating User Friendly Joomla! Websites and Forms | Joomla! Day Deutschland
Creating User Friendly Joomla! Websites and Forms | Joomla! Day Deutschland
ThemePartner
 
Web Engineering - Web Application Testing
Web Engineering - Web Application TestingWeb Engineering - Web Application Testing
Web Engineering - Web Application Testing
Nosheen Qamar
 
Web engineering - Measuring Effort Prediction Power and Accuracy
Web engineering - Measuring Effort Prediction Power and AccuracyWeb engineering - Measuring Effort Prediction Power and Accuracy
Web engineering - Measuring Effort Prediction Power and Accuracy
Nosheen Qamar
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
Marlon Jamera
 
Web engineering - An overview about HTML
Web engineering -  An overview about HTMLWeb engineering -  An overview about HTML
Web engineering - An overview about HTML
Nosheen Qamar
 
Web Engineering - Introduction to CSS
Web Engineering - Introduction to CSSWeb Engineering - Introduction to CSS
Web Engineering - Introduction to CSS
Nosheen Qamar
 
PROGRESS - CSS BASIC
PROGRESS - CSS BASICPROGRESS - CSS BASIC
PROGRESS - CSS BASIC
UKM PROGRESS
 
Web engineering - HTML Form
Web engineering -  HTML FormWeb engineering -  HTML Form
Web engineering - HTML Form
Nosheen Qamar
 
Need for Web Engineering
Need for Web EngineeringNeed for Web Engineering
Need for Web Engineering
Nosheen Qamar
 
Angular js for beginners
Angular js for beginnersAngular js for beginners
Angular js for beginners
Munir Hoque
 
[Basic HTML/CSS] 3. html - table tags
[Basic HTML/CSS] 3. html - table tags[Basic HTML/CSS] 3. html - table tags
[Basic HTML/CSS] 3. html - table tags
Hyejin Oh
 
Web Engineering - Basic CSS Properties
Web Engineering - Basic CSS PropertiesWeb Engineering - Basic CSS Properties
Web Engineering - Basic CSS Properties
Nosheen Qamar
 
Ad

Similar to HTML Forms (20)

lecture9-10-160807085530.pptx dgdg fdgdfv ds
lecture9-10-160807085530.pptx dgdg fdgdfv dslecture9-10-160807085530.pptx dgdg fdgdfv ds
lecture9-10-160807085530.pptx dgdg fdgdfv ds
drpreetiwctm
 
HTML-Forms
HTML-FormsHTML-Forms
HTML-Forms
Ahmed Saihood
 
Form using html and java script validation
Form using html and java script validationForm using html and java script validation
Form using html and java script validation
Maitree Patel
 
Gitika html ppt
Gitika html pptGitika html ppt
Gitika html ppt
gitika -
 
Html Forms
Html FormsHtml Forms
Html Forms
poojaingale5
 
Presentation1
Presentation1Presentation1
Presentation1
REVTISHEVATE
 
Html4
Html4Html4
Html4
Abhishek Kesharwani
 
HTML Forms.pptx ( web development html / css)
HTML Forms.pptx ( web development html / css)HTML Forms.pptx ( web development html / css)
HTML Forms.pptx ( web development html / css)
iidkaafi48
 
Html Form Controls
Html Form ControlsHtml Form Controls
Html Form Controls
Bosco Technical Training Society, Don Bosco Technical School (Aff. GGSIP University, New Delhi)
 
Html tables, forms and audio video
Html tables, forms and audio videoHtml tables, forms and audio video
Html tables, forms and audio video
Saad Sheikh
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
Abhishek Kesharwani
 
FormL13.pptx
FormL13.pptxFormL13.pptx
FormL13.pptx
serd4
 
Html forms
Html formsHtml forms
Html forms
Abhishek Kesharwani
 
Html4
Html4Html4
Html4
Abhishek Kesharwani
 
Html forms
Html formsHtml forms
Html forms
KoreshPadhi
 
Html Guide
Html GuideHtml Guide
Html Guide
Jspider - Noida
 
unit2_HTML_Forms fundamentals of html and crore concepts.pptx
unit2_HTML_Forms fundamentals of html and crore concepts.pptxunit2_HTML_Forms fundamentals of html and crore concepts.pptx
unit2_HTML_Forms fundamentals of html and crore concepts.pptx
22247019
 
HTML - FORMS.pptx
HTML - FORMS.pptxHTML - FORMS.pptx
HTML - FORMS.pptx
Nyssakotian
 
Web forms and html (lect 4)
Web forms and html (lect 4)Web forms and html (lect 4)
Web forms and html (lect 4)
Salman Memon
 
5. Frames & Forms.pdf
5. Frames & Forms.pdf5. Frames & Forms.pdf
5. Frames & Forms.pdf
qwertyuiop154709
 
Ad

More from Ravinder Kamboj (14)

Data warehouse,data mining & Big Data
Data warehouse,data mining & Big DataData warehouse,data mining & Big Data
Data warehouse,data mining & Big Data
Ravinder Kamboj
 
DDBMS
DDBMSDDBMS
DDBMS
Ravinder Kamboj
 
Cost estimation for Query Optimization
Cost estimation for Query OptimizationCost estimation for Query Optimization
Cost estimation for Query Optimization
Ravinder Kamboj
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
Ravinder Kamboj
 
Query processing
Query processingQuery processing
Query processing
Ravinder Kamboj
 
Normalization of Data Base
Normalization of Data BaseNormalization of Data Base
Normalization of Data Base
Ravinder Kamboj
 
Architecture of dbms(lecture 3)
Architecture of dbms(lecture 3)Architecture of dbms(lecture 3)
Architecture of dbms(lecture 3)
Ravinder Kamboj
 
Sql fundamentals
Sql fundamentalsSql fundamentals
Sql fundamentals
Ravinder Kamboj
 
Lecture 1&amp;2(rdbms-ii)
Lecture 1&amp;2(rdbms-ii)Lecture 1&amp;2(rdbms-ii)
Lecture 1&amp;2(rdbms-ii)
Ravinder Kamboj
 
Java script
Java scriptJava script
Java script
Ravinder Kamboj
 
File Management
File ManagementFile Management
File Management
Ravinder Kamboj
 
DHTML
DHTMLDHTML
DHTML
Ravinder Kamboj
 
CSA lecture-1
CSA lecture-1CSA lecture-1
CSA lecture-1
Ravinder Kamboj
 
Relational database management system (rdbms) i
Relational database management system (rdbms) iRelational database management system (rdbms) i
Relational database management system (rdbms) i
Ravinder Kamboj
 

Recently uploaded (20)

Political History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptxPolitical History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 

HTML Forms

  • 1. HTML Forms Ravinder Kamboj Assistant Professor LCET, Katani Kalan
  • 2. HTML Forms • HTML Forms are required when you want to collect some data from the site visitor. • For example during user registration you would like to collect information such as name, email address, credit card, etc. • A form will take input from the site visitor and then will post it to a back-end application such as CGI, ASP Script or PHP script etc. • The back-end application will perform required processing on the passed data based on defined business logic inside the application.
  • 3. Elements in forms • There are various form elements available like: • Text fields • Textarea fields • Drop-down menus • Radio buttons • Checkboxes • etc.
  • 4. Syntax • The HTML <form> tag is used to create an HTML form and it has following syntax: <form action="Script URL“ method="GET|POST"> form elements like input, textarea etc. </form>
  • 6. HTML Form Controls • There are different types of form controls that you can use to collect data using HTML form: – Text Input Controls – Checkboxes Controls – Radio Box Controls – Select Box Controls – File Select boxes – Hidden ControlsClickable Buttons – Submit and Reset Button
  • 7. Text Input Controls • There are three types of text input used on forms: – Single-line text input controls - This control is used for items that require only one line of user input, such as search boxes or names. They are created using HTML <input> tag. – Password input controls - This is also a single-line text input but it masks the character as soon as a user enters it. They are also created using HTMl <input> tag. – Multi-line text input controls - This is used when the user is required to give details that may be longer than a single sentence. Multi-line input controls are created using HTML <textarea> tag.
  • 8. Single-line text input controls • This control is used for items that require only one line of user input, such as search boxes or names. They are created using HTML <input> tag. <html> <head> <title>Text Input Control</title> </head> <body> <form > First name: <input type="text" name="first_name" /> <br> Last name: <input type="text" name="last_name" /> </form> </body> </html>
  • 10. Password input controls • This is also a single-line text input but it masks the character as soon as a user enters it. • They are also created using HTML <input> tag but type attribute is set to password. <html> <head> <title>Password Input Control</title> </head> <body> <form > User ID : <input type="text" name="user_id" /> <br> Password: <input type="password" name="password" /> </form> </body> </html>
  • 11. Multiple-Line Text Input Controls • This is used when the user is required to give details that may be longer than a single sentence. • Multi-line input controls are created using HTML <textarea> tag.
  • 12. Example <html> <head> <title>Multiple-Line Input Control</title> </head><body> <form> Description : <br /> <textarea rows="5" cols="50" name="description"> Enter description here... </textarea> </form> </body> </html>
  • 13. Attributes of textarea • Following is the list of attributes for <textarea> tag.
  • 14. Checkbox Control • Checkboxes are used when more than one option is required to be selected. • They are also created using HTML <input> tag but type attribute is set to checkbox. • Attributes of <checkbox> tag:
  • 15. Example <html> <head> <title>Checkbox Control</title> </head> <body> <form> <input type="checkbox" name="maths" value="on"> Maths <input type="checkbox" name="physics" value="on"> Physics </form> </body> </html>
  • 16. Radio Button Control • Radio buttons are used when out of many options, just one option is required to be selected. • They are also created using HTML <input> tag but type attribute is set to radio.
  • 17. Example <html> <head> <title>Radio Box Control</title> </head> <body> <form> <input type="radio" name="subject" value="maths"> Maths <input type="radio" name="subject" value="physics"> Physics </form> </body> </html>
  • 18. Attributes • Following is the list of attributes for radio button:
  • 19. Select Box Control • A select box, also called drop down box which provides option to list down various options in the form of drop down list, from where a user can select one or more options. <html> <head> <title>Select Box Control</title> </head> <body> <form> <select name="dropdown"> <option value="Maths" selected>Maths</option> <option value="Physics">Physics</option> </select> </form> </body> </html>
  • 21. File Upload Box • If you want to allow a user to upload a file to your web site, you will need to use a file upload box, also known as a file select box. • This is also created using the <input> element but type attribute is set to file.
  • 22. Example <html> <head> <title>File Upload Box</title> </head> <body><form> Select file: <input type="file" name="fileupload" accept="image/*" /> </form> </body> </html>
  • 24. Button Controls • There are various ways in HTML to create clickable buttons. • You can also create a clickable button using <input> tag by setting its type attribute to button. • The type attribute can take the following • values:
  • 26. Example <html> <head> <title>Buttons</title> </head> <body> <form> <input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" /> <input type="button" name="ok" value="OK" /> <input type="image" name="imagebutton" src="images/logo.jpg" /> </form> </body> </html>
  • 27. Hidden Form Controls • Hidden form controls are used to hide data inside the page which later on can be pushed to the server. • This control hides inside the code and does not appear on the actual page.
  • 28. Example <html> <head> <title>File Upload Box</title> </head> <body> <form> <p>This is page 10</p> <input type="hidden" name="pagename" value="10" /> <input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" /> </form> </body> </html>