Friday 12 September 2014

HTML FORMS



Lecture 6
HTML Advance Tags – 

Today we will learn HMTL Form and their different elements. 

HTML Form: In HTML, forms are the best method used to get user input. HTML form take information from user or web surfer, like name, password, email address, address, phone number etc. We use different html elements to take these inputs from user like – text fields, checkboxes, radio buttons, list boxes, submit buttons etc.

<form> tag and its attribute :Basically, HTML forms are used take user entered text and pass this text to the server for further processing. <form> tag is placed inside body tag, like 


Attribute of <form> tag: There are 2 basic attributes of <form> tag –

Example :       
             <form name=”html-form” method=”post” action=” ”>
                                    Form content
</form>

Input Elements of HMTL Form: Following are some input elements used to take user input –

1      Text Boxes: Textboxes are used to take one-line user input.


     Password field:  It is used to take user password.






     Radio Field: It lets user to select only one out of many choices.

     Checkboxes: It lets user to select zero or more numbers of choices.






     Button Field: Button is normally used to send form data to the server. This data is sent to the specified page defined in the form’s action attribute.



Example: Code


Output









 
Note: In Next lecture, we will learn about HTML Layout with <table> and <div> tags.






No comments:

Post a Comment