How to use HTML Form Elements

0
10

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 20 times, 1 visits today)
SHARE
Previous article12-CSS Text Color
Next articleHTML elements
Hello Itsourcecoders, welcome to itsourcecode.com. I'm Joken Villanueva, MIT a passionate Blogger, Programmer and a Hobbyist. I started Itsourcecode because I wanted to give back and Share all the learnings and knowledge I've learned in my career and I believe through this website I would be able to help and assist those newbie programmers in enhancing their skills from different programming languages. So let us all help each other by sharing our ideas!

LEAVE A REPLY

Please enter your comment!
Please enter your name here