Download presentation
Presentation is loading. Please wait.
Published byIrish Duron Modified over 8 years ago
1
Informatics Computer School CS114 Web Publishing HTML Lesson 4
2
2 Lesson Outline §Introduction to forms §Basic Form Tags §Sample codes
3
3 Introduction to forms Forms Forms help web designers to receive input from users. A very simple way to reach out to the net-audience at large. Forms can also be used as sell products and carry out business transactions. Forms are specified by the and tags.
4
4 Basic Form Tags used in HTML The beginning tag of a form. Needs to be closed with. The typical attributes of this tag are NAME, METHOD and ACTION. Tag to give an identity to the form. The HTTP method : GET, POST or LINK The URL(which usually points to a CGI program) to send data to Indicates one of several types of user input, such as text, radio, checkbox, textarea, submit, reset.
5
5 A selectable list of strings. An optional attribute that specifies the initial value for any input element. To check a member of a checkbox family as default. An optional attribute indicating the list item is initially selected.
6
6 When this button is clicked, the form data input is sent to the URL indicated by ACTION. To clear all the fields entered on the form.
7
7 Sample Code 1 Enter your name: Enter your age : Date of birth :
8
8 Sample Code 2 <FORM NAME="sample" METHOD=POST ACTION="mailto:mani6374@yahoo.com" > Enter your name: Enter your age : Date of birth : Enter your sex : MALE FEMALE
9
9 Select your race: CHINESE MALAY INDIAN OTHERS
10
10 Exercise 1 Write the HTML codes to display the following form. Pay attention to the neat presentation of this form.
11
11 Exercise 2 Write the HTML codes for this simple quiz form.
12
12 Exercise 3 Write HTML codes for this simple registration form.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.