More information about forms and tables.

Input type Code Input element
Select
<select name='order'>
   <option value=''>Choose one...</option>
   <optgroup label='group 1'>
      <option value='1'>First</option>
      <option value='2'>Second</option>
   </optgroup>
   <optgroup label='group 2'>
      <option value='3'>Third</option>
      <option value='4'>Fourth</option>
   </optgroup>
</select>
Text Input
<input type='text' name='myname' 
   value='' maxlength='16' size='16' />
Password Input
<input type='password' name='mypwd' 
   value='' maxlength='16' size='16' />
Radio Buttons
<input type='radio' name='sex' value='m' />Male 
<input type='radio' name='sex' value='f' />Female
Male Female
Checkbox
<ul>
   <li><input type='checkbox' name='color' 
      value='red' />red</li>
   <li><input type='checkbox' name='color' 
      value='orange' />orange</li>
   <li><input type='checkbox' name='color' 
      value='yellow' />yellow</li>
   <li><input type='checkbox' name='color' 
      value='green' />green</li>
</ul>
  • red
  • orange
  • yellow
  • green
Textarea
<textarea name='story' rows='3' columns='12'>
</textarea>
Return to WebCourse

Disclaimer: The information found and the views expressed in these homepages are not the responsibility of the University of Aberdeen nor do they reflect institutional policy.