ACC - Fundamentals of auditing and business
ACC311ACC501
ACF - (Accounting And Finance Related)
ACF619ACFI619
COM - (Commerce Related)
COM619COMI619
ECO - (Economics Related)
ECO401 ECO402 ECO403 ECO404
ENG - (English Related)
ENG001 ENG101 ENG201 ENG301 ENG401
ETH201 - Ethics (for Non-Muslims)
ETH201
ISL201 - Islamic Studies
ISL201
IT - (Info Tech Related
IT000IT0001IT430IT619ITI619
MIS - (Project And Internship Report)
MIS619 MISI619MIS620 MISI620
PAD - (Public Administration Related)
PAD619 PADI619
PAK301 - Pakistan Studies
PAK301PAK302
PHY - (Physics Related)
PHY101 PHY301
PSC201 - International Relations
PSC201PSC401
SOC - (Socialogy Related)
SOC101 SOC401
STA - (Statistics and Research)
STA301 STA630
URDU - (Urdu Related)
URD101
VUPROJECTS
AIOU PROJECTS
VUDESK TUBE
VUDESK APP
IT INTERNSHIPS FB Page
FB Group
DESK MEMBERS

APPLY NOW  | SIT (STEP IN SECURITY) | Ghrapical Password | Smart ETL Tool | SMS BLOCKER

Creating forms in HTML

Forms in websites are used to get input from the users. A form consists of
different controls like buttons, textboxes, radio buttons, and check
boxes etc. /font>form> and /font>/form> tags are used to create a form in the webpage.

Attributes

  • name –. it is used to identify the form.
  • method – it is used to specify the method for sending data in the form. Two options are get and post. The get method sends the contents of the form as part of the URL. The post method sends the contents of the form as a separate bit-stream of data.
  • action – it is used to specify the URL that will process data in the form.
The elements are added to a form by using /font>input type=””> tag. Different elements of a form are as follows:


  • text – it is used to display a text field in a form. /font>input type="text">
  • password – it is used to display a text field for entering password. The input is replaced by asterisk. /font>input type="password">
  • button – it is used to display a button in the form. /font>input type="button">
  • checkbox – it is used to display a checkbox in a form. /font>input type="checkbox">
  • radio – it is used to display a radio button in a form. /font>input type="radio">
  • reset – it is used to display a reset button in a form. This button clears the contents of form. /font>input type="reset">
  • submit – it is used to display a submit button in the form. This button is used to process the contents of the form. /font>input type="submit">
  • select – it is used to display a list box in the form.
/font>select>
/font>option>
options…..
/font>/option>
/font>/select>

  • textarea – it is used to display multi-line text box in the form.
/font>textarea>
any text to be displayed…..
/font>/textarea>

Practice

/font>html>
/font>head>/font>title>Form Demo/font>/title>/font>/head>
/font>body>
/font>form name="f" action=sohailx2x@yahoo.com method="get">
/font>p>Enter your name: /font>input type="text">/font>/p>
/font>p>Select your gender: /font>/p>
/font>p>Male /font>input type="radio" name="gender" checked>
Female /font>input type="radio" name="gender">/font>/p>
/font>p>Choose your hobbies: /font>/p>
Reading /font>input type="checkbox">
Traveling /font>input type="checkbox">
Chatting /font>input type="checkbox">
Swimming /font>input type="checkbox">
/font>p>Choose your city: /font>/p>
/font>select>
/font>option>Islamabad/font>/option>
/font>option>Karachi/font>/option>
/font>option>Peshawar/font>/option>
/font>option>Rawalpindi/font>/option>
/font>/select>
/font>p>Enter your comments/font>/p>
/font>p>/font>textarea rows=5 cols=25>/font>/textarea>/font>/p>
/font>input type="submit" value="Send">
/font>input type="reset" value="Clear">
/font>/form>
/font>/body>
/font>/html>

Note: Apply the above examples/practices in Notepad and Internet Explorer and see the result.

Preview for the above practice in browser

Copy and paste the code of the above practice, in notepad and save the notepad file with html or htm extension and check the result in browser
like Internet Explorer, as follows.

=========================================================================



=========================================================================

Views: 73

Replies to This Discussion

Advertise Here

nice one liked by me.............!

nice work

RSS

Super Active Members 

Sponsers

VUDESK GROUPS

 

© 2019   Created by ʭIsmail Shahʭ.   Powered by

Badges  |  Report an Issue  |  Terms of Service