Forms

676 views
623 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
676
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Forms

  1. 1. FORMS in HTML
  2. 2. <ul><li>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. </li></ul><ul><li>Users generally &quot;complete&quot; 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.) </li></ul>
  3. 3. <ul><li><FORM action=&quot;http://somesite.com/prog/adduser&quot; method=&quot;post&quot;> </li></ul><ul><li><P> </li></ul><ul><li><LABEL for=&quot;firstname&quot;>First name: </LABEL> </li></ul><ul><li><INPUT type=&quot;text&quot; id=&quot;firstname&quot;><BR> </li></ul><ul><li><LABEL for=&quot;lastname&quot;>Last name: </LABEL> </li></ul><ul><li><INPUT type=&quot;text&quot; id=&quot;lastname&quot;><BR> </li></ul><ul><li><LABEL for=&quot;email&quot;>email: </LABEL> </li></ul><ul><li><INPUT type=&quot;text&quot; id=&quot;email&quot;><BR> </li></ul><ul><li><INPUT type=&quot;radio&quot; name=&quot;sex&quot; value=&quot;Male&quot;> Male<BR> </li></ul><ul><li><INPUT type=&quot;radio&quot; name=&quot;sex&quot; value=&quot;Female&quot;> Female<BR> </li></ul><ul><li><INPUT type=&quot;submit&quot; value=&quot;Send&quot;> <INPUT type=&quot;reset&quot;> </li></ul><ul><li></P> </li></ul><ul><li></FORM> </li></ul>
  4. 4. <ul><li>Users interact with forms through named controls . </li></ul><ul><li>HTML defines the following control types: </li></ul><ul><ul><li>buttons </li></ul></ul><ul><ul><li>checkboxes </li></ul></ul><ul><ul><li>radio buttons </li></ul></ul><ul><ul><li>menus </li></ul></ul><ul><ul><li>text input </li></ul></ul><ul><ul><li>file select </li></ul></ul><ul><ul><li>hidden controls </li></ul></ul><ul><ul><li>object controls </li></ul></ul>
  5. 5. <ul><li>This example creates a TEXTAREA control that is 20 rows by 80 columns and contains two lines of text initially. The TEXTAREA is followed by submit and reset buttons. </li></ul><ul><li><FORM action=&quot;http://somesite.com/prog/text-read&quot; method=&quot;post&quot;> <P> <TEXTAREA name=&quot;thetext&quot; rows=&quot;20&quot; cols=&quot;80&quot;> First line of initial text. Second line of initial text. </TEXTAREA> <INPUT type=&quot;submit&quot; value=&quot;Send&quot;><INPUT type=&quot;reset&quot;> </P> </FORM> </li></ul>

×