ITSourceCode.com

Free Source Code and Tutorials

Custom Search

How to use HTML Form Elements

There are several important Form elements which provide extra feature and helps in enhancing the net output.

<SELECT> element

This tag defines a drop down list.

Example:

  1. <form action="r.php"><select name="bikes">
  2. <option value="honda">honda</option>
  3. <option value="BMW">BMW</option>
  4. <option value="Bajaj">Bajaj</option>
  5.  
  6. <input type="submit" />
  7.  
  8. </form>

Pre-selecting an option so that it can be a default value

Example:

  1. <form action="r.php"><select name="bikes">
  2. <option value="honda">honda</option>
  3. <option selected="selected" value="BMW">BMW</option>
  4. <option value="Bajaj">Bajaj</option>
  5.  
  6. <input type="submit" />
  7.  
  8. </form>&nbsp;


Text area

This is to provide a paragraph space!!

Example:

  1. <form action="r.php"><textarea cols="30" name="message" rows="10">&lt;br /&gt;&lt;br /&gt;
  2.   Pam was going to the market.&lt;br /&gt;&lt;br /&gt;
  3.   </textarea><input type="submit" />
  4.  
  5. </form>&nbsp;
Facebook Comments
(Visited 4 times, 1 visits today)
Share this

Check Your Domain Ranking

Leave a Reply

Your email address will not be published. Required fields are marked *

ITSourceCode.com © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!




%d bloggers like this: