manohar forms
TRANSCRIPT
FORMS IN HTML
By- Manohar Prasad.
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
05/01/2023 08:45 AMManohar Prasad.
ATTRIBUTES OF FORM TAG:Action=urlMethod=get/postTarget=name
3
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
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>
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
05/01/2023 08:45 AMManohar Prasad.
Thanks !
7