manohar forms

7

Click here to load reader

Upload: manohar-prasad

Post on 20-Feb-2017

2.751 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Manohar forms

FORMS IN HTML

By- Manohar Prasad.

Page 2: Manohar forms

05/01/2023 08:45 AMManohar Prasad.

FORMS: Why Forms ? Forms are used to create interactive Web pages.Definition of Forms:An HTML form is a section of a document containing normal content, markup, special elements called controls (checkboxes, radio buttons, menus, etc.), and labels on those controls. Users generally "complete" a form by modifying its controls (entering text, selecting menu items, etc.), before submitting the form to an agent for processing (e.g., to a Web server, to a mail server, etc.)

2

Page 3: Manohar forms

05/01/2023 08:45 AMManohar Prasad.

ATTRIBUTES OF FORM TAG:Action=urlMethod=get/postTarget=name

3

Page 4: Manohar forms

05/01/2023 08:45 AMManohar Prasad.

TAGS WITHIN FORM TAG:

1. <Input> Align=top/left/right/center/bottom, Maxlength =number, Name=name, Size=number, Src=image. ATTRIBUTES of INPUT TAG: Value=Initial Value, Type=Text/Password/Checkbox/Radio/Submit/ Reset/File/Image.

2. <Textarea> Cols=number, Name=text, Rows= number, Wrap=virtual/Physical/off.

3. <Select> Size=number, Name=select, Multiple

4

Page 5: Manohar forms

Example of Form elements:<Html><Head><Title> Example:</Title></Head>

<Body><Img src=“abc.jpg” Width=“….” Height=“….”>

<Form method=“Post”> Name:<Input type=“Text” align=“left” Size=“30”

Name=“name”>Sex:<Input type=“Radio” Checked name=“R1”

Value=“M”> MalePassword:<Input type=“password” Size=“10”

Name=“Pass”>Address:<Textarea name=“Text” Rows=“4”

Cols=“20” Align=“Middle”></Textarea>

Page 6: Manohar forms

05/01/2023 08:45 AMManohar Prasad.

Example of Form elements: Continued……

Country: <Select name=“Select” Size=“4”><Option>India</Option>

Hobbies:<Input name=“Box” Type=“Checkbox” Value=“Yes”>

<Input Type=“Submit” Value=“Submit”><Input Type=“Reset” Value=“Cancel”>

</Form></Body></Html>

6

Page 7: Manohar forms

05/01/2023 08:45 AMManohar Prasad.

Thanks !

7