4. • HTML tags are the
hidden keywords within a web
page that define how the browser
must format and display the
content.
• Most tags must have two parts, an
opening and a closing part. For
example, <html> is the opening
tag and </html> is the closing tag.
4
5. HTML tags follow a simple but strict
syntax:
• Opening angle bracket (<)
• Tag Name
• Attributes (optional): First a space, then the
attribute name, an equal sign (=), and a value
enclosed in double quotes ("").
• Closing angle bracket (>)
5
6. Form allow you to type
information into fields on a
browser screen and submit that
information to a web server.
6
7. Html form tags are used to create html
forms.
Syntax:
<form action=“script URL” method= get |
post>form elements like input , text area
etc.</form>
7
8. • Action :
background script ready to process or
passed data
• Target:
Specify target window or frame where the
result of script will be displayed.
8
9. Method:
GET -- this is the default method and causes
the fill-out form contents to be appended to
the URL. Use only when submit has no
effect. e.g. pure query.
POST -- this method causes the fill-out form
contents to be sent to the server in a data
body rather than as part of the URL.
9
11. 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 Controls
• Clickable Buttons
• Submit and Reset Button
11
12. 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 <text area> tag.
12
13. • Basic example of a single-line text input used
to take first name and last
name
13
15. 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.
Attributes :
• Types
• Name
• Value
• Size
• Max length
15
16. 16
• basic example of a single-line password
input used to take user password:
18. 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:
• Type
• Name
• Value
• check
18
19. • an example HTML code for a form with two
checkboxes:
19
21. 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.
• Attributes
• Type
• Name
• Value
• checked
21
22. 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.
• attributes
• Name.
• Size.
• Multiple.
22
25. 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.
Attributes:
• Name
• accept
25
28. 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.
• Attributes:
• Submit
• Reset
• Button
• image 28