SlideShare una empresa de Scribd logo
1 de 34
1
Web Engineering
Forms
Lecture 04
FORMS
• Its how HTML does interactivity. There are quite
new feature in HTML5. But the fundamental
idea does not change since the first web
browser.
• There basically two ways to use forms in HTML.
 Traditionally they are mostly use to interface with
the process on server using PHP/ASP.
 Today they are often use to interface with JavaScript
running on client machine.
Interactive Forms (1)
• Without forms, a Web site is “read-only” – it
just provides information to the user.
• Forms enable the user to provide information
to the Web site. For example, the user can:
– Perform searches on Web site
– Give comments
– Ask for info that is not available on the Website
– Place order for goods and services
4
Interactive Forms (2)
• Can be simple or very complex
• Can fill a whole page or just a single line
• Can contain a single element or many
• Are always placed between the <BODY> and
</BODY> tags of a Web page
5
Interactive Forms (3)
• Are GUI-based
• May contain:
– Text fields
– Check boxes
– Buttons
– Scrollable lists
FORM Tag
• All of the component of a form appear in the
content of a <form> tag.
• Example:
<form name=“sendEmail” method=“post”
action=“sendMailServerScriptURL”
autocomplete=“off” > </form>
• The action attribute specifies the URL of the
application on the web server that is to be
called when the user clicks the SUBMIT button.
• The method attribute specifies one of the two
techniques, get or post. Used to pass the form
data to the server.
INPUT Tag
• <input> tag is used for text, passwords,
checkboxes, radio buttons, action button reset
and submit.
• One attribute of <input> tag is type, which
specifies particular kind of controls
• Example
<form name=“sendEmail” method=“get”
action=“”>
<input type=“text” name=“name” size=“25”
maxlength=“25” />
</form>
8
Single-Line Text Input Field
<INPUT
type=“text”
name=“fieldName”
size=“widthInCharacters”
maxlength=“limitInCharacters”
value=“initialDefaultValue”
placeholder=“initialDefaultValue”
autofocus
required
readonly
/>
9
10
Password Input Field
<INPUT
type=“password”
name=“fieldName”
size=“widthInCharacters”
maxlength=“limitInCharacters”
value=“initialDefaultValue”
placeholder=“initialDefaultValue”
/>
11
Multi-Line Text Input Area
<TEXTAREA
name=“areaName”
cols=“widthInCharacters”
rows=“numberOfLines”
spellcheck=“true/false”
>
</TEXTAREA>
EXAMPLE
<TEXTAREA
name=“message”
cols=“38”
rows=“6”
wrap=“virtual”
>
</TEXTAREA>
wrap=“virtual” specifies that text in the box
will wrap lines as needed
12
13
Submit Button Input
<INPUT
type=“submit”
name=“buttonName”
value=“displayedText”
/>
14
Reset Button Input Element
(Resets the contents of a form to default values)
<INPUT
type=“reset”
value=“dispalyedText”
>
15
16
<FORM name="sendEmail" method="post" action=“sendMailScriptURL">
<table><tr>
<td>From: </td>
<td><INPUT type="text" name="sender" size="50“ /></td>
</tr><tr>
<td>To: </td>
<td><INPUT type=“email" name="receiver" size="50“ /></td>
</tr><tr>
<td>Subject: </td>
<td><INPUT type="text" name="subject" size="50“ /></td>
</tr><tr>
<td valign="top">Message: </td>
<td><TEXTAREA name="message" cols="38"rows="6"> </TEXTAREA></td>
</tr><tr>
<td colspan="2" align="right">
<INPUT type="submit" name="sendEmail" value="Send eMail“ />
</td>
</tr></table>
</FORM>
17
18
<form name="login" method="post" action="loginScript">
<table><tr>
<td>User Name: </td>
<td>
<input type="text" name="userName" size="10“ />
</td>
</tr><tr>
<td>Password: </td>
<td>
<input type="password" name="password" size="10“ />
</td>
</tr><tr>
<td colspan="2" align="right">
<input type="submit" name="login" value="Log me in“ />
</td>
</tr></table>
</form>
19
Checkbox Input Element
<INPUT
type=“checkbox”
name=“checkboxName”
checked
value=“checkedValue”
/>
20
21
Radio Button Input Element
<INPUT
type=“radio”
name=“radioButtonName”
checked
value=“selectedValue”
/>
22
23
<form name="login" method="post" action="loginScript">
<table><tr>
<td>User Name: </td>
<td><input type="text" name="userName" size="10"></td>
</tr><tr>
<td>Password: </td>
<td><input type="password" name="password" size="10"></td>
</tr><tr>
<td valign="top">Logging in from:</td>
<td>
<input type="radio" name="from" value="home“ checked=“checked”>
Home<br>
<input type="radio" name="from" value="office"> Home<br>
<input type="radio" name="from" value="university" > University
</td>
</tr><tr>
<td colspan="2" align="right">
<input type="submit" name="login" value="Log me in">
</td>
</tr></table>
</form>
24
25
Select from a (Drop Down) List
<SELECT
name=“listName”
size=“numberOfDisplayedChoices”
multiple
>
<OPTION value=“value1”> text1
<OPTION value=“value2” selected> text2
<OPTION value=“value3”> text2
…
…
</SELECT>
26
27
File Upload Input Element
<INPUT
type=“file”
name=“uploadfile”
enctype=“multipart/form-data”
size=“35”
>
28
Date Input Element
<INPUT
type=“date”
name=“date1”
pattern=“d{4}-d{2}-d{2}”
title=“YYYY-DD-MM”
>
29
Number Input Element
<INPUT
type=“number”
name=“number1”
min=“1”
max=“5”
value=“1”
/>
30
Range Input Element
<INPUT
type=“range”
name=“range1”
min=“0”
max=“100”
step=“10”
value=“20”
/>
31
Search Input Element
<INPUT
type=“search”
name=“search1”
/>
32
URL Input Element
<INPUT
type=“url”
name=“url1”
/>
33
Color Input Element
<INPUT
type=“color”
name=“color1”
value=“#336699”
/>
34
16 Possible Values for the “type”
Attribute of <INPUT> tag
1. text
2. password
3. hidden
4. checkbox
5. radio
6. file
7. reset
8. submit
9. url
10. email
11. tel
12. time
13. date
14. search
15. range
16. datetime-local

Más contenido relacionado

La actualidad más candente

MS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.pptMS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.ppt
1520lakshyagupta
 
Access introduction
Access introductionAccess introduction
Access introduction
Jithin Zcs
 
Internet programming lecture 1
Internet programming lecture 1Internet programming lecture 1
Internet programming lecture 1
Mohammed Hussein
 

La actualidad más candente (20)

Kirtesh Khandelwal,Project on HTML and CSS ,Final Year BCA , Dezyne E'cole Co...
Kirtesh Khandelwal,Project on HTML and CSS ,Final Year BCA , Dezyne E'cole Co...Kirtesh Khandelwal,Project on HTML and CSS ,Final Year BCA , Dezyne E'cole Co...
Kirtesh Khandelwal,Project on HTML and CSS ,Final Year BCA , Dezyne E'cole Co...
 
Simple object access protocol(soap )
Simple object access protocol(soap )Simple object access protocol(soap )
Simple object access protocol(soap )
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScript
 
CSS ppt
CSS pptCSS ppt
CSS ppt
 
Php forms and validations by naveen kumar veligeti
Php forms and validations by naveen kumar veligetiPhp forms and validations by naveen kumar veligeti
Php forms and validations by naveen kumar veligeti
 
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesLearn 90% of Python in 90 Minutes
Learn 90% of Python in 90 Minutes
 
Static and Dynamic webpage
Static and Dynamic webpageStatic and Dynamic webpage
Static and Dynamic webpage
 
MS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.pptMS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.ppt
 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
 
Access introduction
Access introductionAccess introduction
Access introduction
 
CSS Lists and Tables
CSS Lists and TablesCSS Lists and Tables
CSS Lists and Tables
 
Internet programming lecture 1
Internet programming lecture 1Internet programming lecture 1
Internet programming lecture 1
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
 
MS Access teaching powerpoint tasks
MS Access teaching powerpoint tasksMS Access teaching powerpoint tasks
MS Access teaching powerpoint tasks
 
Malicious software
Malicious softwareMalicious software
Malicious software
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete Notes
 
UX, Front-end and Back-end: How front-end can help these guys?
UX, Front-end and Back-end: How front-end can help these guys?UX, Front-end and Back-end: How front-end can help these guys?
UX, Front-end and Back-end: How front-end can help these guys?
 
How to learn HTML in 10 Days
How to learn HTML in 10 DaysHow to learn HTML in 10 Days
How to learn HTML in 10 Days
 
HTML5: features with examples
HTML5: features with examplesHTML5: features with examples
HTML5: features with examples
 
Id and class selector
Id and class selectorId and class selector
Id and class selector
 

Destacado

[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
 
[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
 
Java script introducation & basics
Java script introducation & basicsJava script introducation & basics
Java script introducation & basics
H K
 
[Basic HTML/CSS] 6. css - box sizing, display, margin, padding
[Basic HTML/CSS] 6. css - box sizing, display, margin, padding[Basic HTML/CSS] 6. css - box sizing, display, margin, padding
[Basic HTML/CSS] 6. css - box sizing, display, margin, padding
Hyejin Oh
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
Doncho Minkov
 

Destacado (20)

Web engineering - An overview about HTML
Web engineering -  An overview about HTMLWeb engineering -  An overview about HTML
Web engineering - An overview about HTML
 
PROGRESS - CSS BASIC
PROGRESS - CSS BASICPROGRESS - CSS BASIC
PROGRESS - CSS BASIC
 
Web Engineering - Introduction to CSS
Web Engineering - Introduction to CSSWeb Engineering - Introduction to CSS
Web Engineering - Introduction to CSS
 
[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
 
Need for Web Engineering
Need for Web EngineeringNeed for Web Engineering
Need for Web Engineering
 
[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
 
Java script basics
Java script basicsJava script basics
Java script basics
 
Java script introducation & basics
Java script introducation & basicsJava script introducation & basics
Java script introducation & basics
 
javascript3
javascript3javascript3
javascript3
 
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
 
Web Engineering - Web Application Testing
Web Engineering - Web Application TestingWeb Engineering - Web Application Testing
Web Engineering - Web Application Testing
 
[Basic HTML/CSS] 6. css - box sizing, display, margin, padding
[Basic HTML/CSS] 6. css - box sizing, display, margin, padding[Basic HTML/CSS] 6. css - box sizing, display, margin, padding
[Basic HTML/CSS] 6. css - box sizing, display, margin, padding
 
[CSS Drawing] Basic Tutorial (라이언 그리기)
[CSS Drawing] Basic Tutorial (라이언 그리기)[CSS Drawing] Basic Tutorial (라이언 그리기)
[CSS Drawing] Basic Tutorial (라이언 그리기)
 
[Basic HTML/CSS] 7. project
[Basic HTML/CSS] 7. project[Basic HTML/CSS] 7. project
[Basic HTML/CSS] 7. project
 
HTML Dasar : #10 Form
HTML Dasar : #10 FormHTML Dasar : #10 Form
HTML Dasar : #10 Form
 
Angular js for beginners
Angular js for beginnersAngular js for beginners
Angular js for beginners
 
Basic css-tutorial
Basic css-tutorialBasic css-tutorial
Basic css-tutorial
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Basic css
Basic cssBasic css
Basic css
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
 

Similar a Web engineering - HTML Form

Html5ppt
Html5pptHtml5ppt
Html5ppt
recroup
 
Web forms and html lecture Number 4
Web forms and html lecture Number 4Web forms and html lecture Number 4
Web forms and html lecture Number 4
Mudasir Syed
 
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
 

Similar a Web engineering - HTML Form (20)

Web forms and html (lect 4)
Web forms and html (lect 4)Web forms and html (lect 4)
Web forms and html (lect 4)
 
Html tables, forms and audio video
Html tables, forms and audio videoHtml tables, forms and audio video
Html tables, forms and audio video
 
Chapter 9: Forms
Chapter 9: FormsChapter 9: Forms
Chapter 9: Forms
 
Html forms
Html formsHtml forms
Html forms
 
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZer
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZerStd 12 Computer Chapter 1 Creating Html Forms Using KompoZer
Std 12 Computer Chapter 1 Creating Html Forms Using KompoZer
 
Gitika html ppt
Gitika html pptGitika html ppt
Gitika html ppt
 
Getting Information through HTML Forms
Getting Information through HTML FormsGetting Information through HTML Forms
Getting Information through HTML Forms
 
MTA html5 organization, input, and validation
MTA html5 organization, input, and validationMTA html5 organization, input, and validation
MTA html5 organization, input, and validation
 
Html5ppt
Html5pptHtml5ppt
Html5ppt
 
Web forms and html lecture Number 4
Web forms and html lecture Number 4Web forms and html lecture Number 4
Web forms and html lecture Number 4
 
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
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
5. Frames & Forms.pdf
5. Frames & Forms.pdf5. Frames & Forms.pdf
5. Frames & Forms.pdf
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Html forms
Html formsHtml forms
Html forms
 
CSS_Forms.pdf
CSS_Forms.pdfCSS_Forms.pdf
CSS_Forms.pdf
 
css and Input attributes
css and Input attributescss and Input attributes
css and Input attributes
 
Training HTML5 CSS3 Ilkom IPB
Training HTML5 CSS3 Ilkom IPBTraining HTML5 CSS3 Ilkom IPB
Training HTML5 CSS3 Ilkom IPB
 
Class 21
Class 21Class 21
Class 21
 
Class 21
Class 21Class 21
Class 21
 

Último

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Último (20)

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 

Web engineering - HTML Form