















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
If you are looking for Web Programming course, you are at right place. This lecture key words are: Html Forms, Purpose of Forms, Posting, History of Forms, Important Elements, Input Element, Label Element, Buttons, Html5 Form Improvements
Typology: Slides
1 / 23
This page cannot be seen from the preview
Don't miss anything!
















Forms are used to create boxes and other controls that allow users to enter data The data is typically submitted to the server for processing We will get to server-side processing in a week or two JavaScript can be used to access form elements on the client
They have been the same “forever” XFforms tried and failed
Big changes in HTML 5 But they don‟t break existing code Not all browsers support all features
The **** element marks a region used to get user input It is the form that is posted to the server The **** element groups visible elements in the form The **** element draws a prompt around the **** box
The action attribute contains the URL where the data will be posted to the server This makes little sense now but will when we talk about server-side processing The method attribute defines how the form is posted get – data is posted the „query string‟ put – data is posted in the form header Note that name attributes deprecated (use id)
A first form with two text boxes:
** First name:
Last name:
**
The **** element contains text that appears in the border It must appear as an immediate child of
It‟s required with XHTML strict
It‟s a visible label that the user sees Use it to create prompts Set the for attribute to the id property of the related control
text elements allow the users to enter text into a text box password elements hides the characters entered The value attribute stores the entered value Example ****
It‟s a box that can be checked or unchecked (a two-state control)
Use to select items from a drop-down list The child **
HTML5 introduces some new controls and extends existing ones **** There are several extensions (w3schools) The placeholder attribute displays default text If the required attribute is set, the form cannot be submitted until the user provides input
**** There are several extensions (w3schools) The placeholder attribute displays default text If the required attribute is set, the form cannot be submitted until the user provides input The required and optional attributes are used with CSS styles attribute is set