ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing

ExpertRating Home
ExpertRating Benefits
Recommend ExpertRating
Suggest More Tests
Privacy Policy
XHTML Tutorial - Index
XHTML Tutorial - Introduction to XHTML
XHTML Tutorial - Formatting
XHTML Tutorial - Links
XHTML Tutorial - Images
XHTML Tutorial - Forms
XHTML Tutorial - Tables
XHTML Tutorial - Frames
XHTML Tutorial - Style Sheets
XHTML Tutorial - Advanced Tags

Online Personal Trainer Certification
Personal Trainer Certification (Spanish)
Six Sigma Certification
Find a Personal Trainer
Project Management Certification
Six Sigma Certification
Six Sigma Black Belt Certification
Master Black Belt Certification
Six Sigma Green Belt Certification
Life Coach Certification
Lean Management Certification
Lean Six Sigma Certification
First Aid Certification
CPR Certification
Yoga Certification
Aerobics Certification
Pilates Certification
Business Analyst Certification
SEO Certification
Online Business Writing Course & Certification
Makeup Artist Certification
Baby Sitting Course & Certification
Time Management Certification
Health Club Management Certification
Medical Coding Certification
Medical Billing Certification
Business Analysis Course
Master Trainer Certification
Total Quality Management Certification
Kaizen Certification
Creative Writing Certification
Event Management Certification
Test Search by Job Title
Administrative Assistant Certification
Virtual Assistant Certification
  All Online Courses


  Home > Courses, Tutorials & eBooks > XHTML Tutorial > Forms
Previous  Next

XHTML Tutorial - Forms

                                                                             Page 5 of 5

The following example illustrates the use of these tags in a web page:




<title> My list of jokes </title>




<h1> My Registration Page </h1>

<form name="registration" action="">


First name: <input type=text name="realname" /> <br/>

Last name: <input type=text name="sirname" /> <br/>

Password: <input type=password name="pass"/> <br/>

Re-Type Password: <input type=password name="repass"/>


<h2>Additional Information </h2>



<select name="sex">

<option value="001"> Male </option>

<option value="002"> Female </option>




<select name=”jokenumber”>

<optgroup label=”Game jokes”>

<option value=”001”> Cricket jokes </option>

<option value=”002”> Golf jokes </option>



<optgroup label=”Other jokes”>

<option value=”111”> Classic jokes </option>

<option value=”112”> Short jokes </option>





<label for=”moreinfo”> Do you want more information on jokes? </label>

<input type=checkbox name=”moreinfo” id=”moreinfo” /><br/><br/>


Enter your comments:

<textarea name=”comments” cols=40 rows=3 wrap=soft>



<button type=reset> Reset </button><br/>

<button type=submit>Send This </button>






This is how the web page looks:



In this chapter you have learnt:

  • The form tag creates a form to be input by the user. It can contain text fields, check boxes, radio buttons and more.
  • The name attribute of form tag is an optional attribute.
  • The action attribute of form tag takes up a URL as its value. It sends the data to the URL defined in action when the submit button is pressed.
  • The <input> tag defines the start of an input field where the user can enter his data.
  • Button, checkbox, hidden, image, password, radio, reset, submit, and text are various attributes of input tag.
  • The option tag is used with the <select> tag to create select lists.
  • The optgroup tag defines an option group. Various choices can be grouped with the help of this tag.


Review Questions

Question 1

Which tag is used to create a form?


Form Tag

Question 2

Which attribute of the form tag defines a unique name for the form?


Name attribute

Question 3

Which is the most important attribute of input tag?


Type attribute

Question 4

Which tag is used with the select tag to create select lists?


Option tag

Question 5

Which tag is used to create a field where a user can enter a large amount of text?


TextArea Tag

What's Next

The next chapter will acquaint you with the basic concepts of tables in a web page. It will also tell you how to add data and colors in the tables.

Hop over to the next chapter to get a close up on tables.



Home  |  About Us  |  Privacy Policy  |  Site Map  |  FAQs  |  Contact Us
© ExpertRating 2015. All Rights Reserved.