5-Web Mark Language-Part4(Form) 6
5-Web Mark Language-Part4(Form) 6
Computing Department
Intermediate Diploma in
Databases and Web
Development
Lecture 7
1
Outlines for part 4
HTML Form
HTML Form Input
HTML <form> element attributes
2
HTML Form
.
Why use HTML Form
HTML forms are required if you want to collect some data from
of the site visitor.
4
HTML Form Syntax
5
HTML <form> element
7
HTML <input> element
8
9
HTML TextField Control
10
Note: If you will omit 'name' attribute then the text filed input
will not be submitted to server. 11
oHTML <textarea> tag in form
12
13
Label Tag in Form
o If you click on the label tag, it will focus on the text control. To
do so, you need to have for attribute in label tag that must be
same as id attribute of input tag.
14
15
HTML Password Field Control
16
HTML 5 Email Field Control
17
Note: If we will not enter the correct email, it
will display error like:
18
Radio Button Control
If you use one name for all the radio buttons, only one
radio button can be selected at a time.
. 19
20
. Checkbox Control
21
Note: These are similar to radio button except it can
choose multiple options at a time and radio button can
select one button at a time, and its display.
22
. Submit button control
23
24
Update by Ikhlas Saad 2024-Semester1 25