Download presentation
Presentation is loading. Please wait.
Published byJames Shields Modified over 9 years ago
1
HTML Form
2
HTML forms are used to collect user input. The element defines an HTML form: Form elements are different types of input elements, checkboxes, radio buttons, submit buttons, and more.. form elements.
3
The Element The element is the most important form element. The element has many variations, depending on the type attribute. Here are the types used in this chapter: TypeDescription textDefines normal text input radioDefines radio button input (for selecting one of many choices) submitDefines a submit button (for submitting the form)
4
Input Type: text defines a one-line input field for text input: First name: Last name:
5
Input Type: radio defines a radio button. Radio buttons let a user select ONE of a limited number of choices: Male Female
6
Input Type: checkbox defines a checkbox. Checkboxes let a user select ZERO or MORE options of a limited number of choices. I have a bike I have a car
7
Input Type: password defines a password field: User name: User password:
8
Input type: submit defines a button for submitting a form to a form-handler. The form-handler is typically a server page with a script for processing input data. The form-handler is specified in the form's action attribute: First name: Last name:
9
The Element (Drop-Down List) The element defines a drop-down list: Volvo Saab Fiat Audi
10
Input Type: button defines a button:
11
Input Type: number The is used for input fields that should contain a numeric value. You can set restrictions on the numbers. Depending on browser support, the restrictions can apply to the input field. Quantity (between 1 and 5):
12
The elements Volvo Saab Fiat Audi
13
The Element The element defines a multi-line input field (a text area): The cat was playing in the garden.
14
The Element The element defines a clickable button: Click Me!
15
HTML Input Attributes The value Attribute – The value attribute specifies the initial value for an input field: First name: Last name:
16
The readonly Attribute The readonly attribute specifies that the input field is read only (cannot be changed): First name: Last name:
17
The disabled Attribute The disabled attribute specifies that the input field is disabled. A disabled element is un-usable and un-clickable. Disabled elements will not be submitted. First name: Last name:
18
The size Attribute The size attribute specifies the size (in characters) for the input field: First name: Last name:
19
The maxlength Attribute The maxlength attribute specifies the maximum allowed length for the input field: First name: Last name:
20
Resources w3schools.com
21
Practical Please see practical #5 on my website
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.