0% found this document useful (0 votes)
2 views

Lecture 4

Uploaded by

IRFAN MUGHAL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lecture 4

Uploaded by

IRFAN MUGHAL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Web Engineering

HTML Forms
HTML Forms

• Whenever you want to collect information from visitors you will


need a form, which lives inside a <form> element.

• Information from a form is sent in name/value pairs.

• Each form control is given a name, and the text the user types in
or the values of the options they select are sent to the server.

2
HTML Form Structure

• <form>
– This element should always carry the action attribute and will
usually have a method and id attribute too.
• Action
– Every <form> element requires an action attribute. Its value is
the URL for the page on the server that will receive the
information.
• Method
– Forms can be sent using one of two methods: get or
post.

3
HTML FORMS

What does it means


(type=“password”)

4
HTML FORMS

What happens if you repeat same


name in radio control???
5
HTML FORMS

6
Grouping Form Elements
The <legend> element can come
You can group related form directly after the opening <fieldset>
controls together inside the tag and contains a caption which
<fieldset> element helps identify the purpose of that
group of form
controls.

7
HTML Form Example

You might also like