Basic HTML forms for beginnersHome page Basic html html tables Text and font tags Image tags Javascript Free Tracking Website hosting Free traffic Html Forms for the beginner and first time webmasters. Explained on this page are the submit button - reset button - text field - radio buttons - check boxes - password field. To find the cgi or java script instructions for the action attributes and method get and post attributes check your web site host. Basic form rules :
Visit www.w3c.org The World Wide Web Consortium |
||
A very basic HTML form | The HTML Code to put the form on your site | |
|
<form action="W" method="X"> <input name="Y" type="text" value="Enter e-mail address"> <button name="senddata" type="submit">Submit</button> </form> |
|
For the above example on your web site:
|
||
|
||
Simple form layout | The HTML Code for the form layout view on the left | |
My web server uses |
My web server uses <br><br> <form> <input name="host" type="radio" value="linux">Linux <input name="host" type="radio" value="unix">Unix <input name="host" type="radio" value="apache">Apache <input name="host" type="radio" value="other">Other <br><br> The internet browsers I use are <br><br> <input name="ie" type="radio" value="iexplorer">Iexplorer <input name="nn" type="radio" value="netscape">Netscape <input name="ff" type="radio" value="fire fox">Fire fox <input name="ob" type="radio" value="other">Other <br><br> <button name="senddata" type="submit">Submit</button> <button name="cleardata" type="reset">Reset</button> </form> |
|
Note that in the example form above you can only select one radio button in the first row. This is a property of radio buttons selecting any button in a group deselect's all other radio buttons in that group. You assign groups using the input name value "host" is used in this example. Use names that will relate to your question and make sense in your form report. The second row uses a different name value for each button and you can select all the radio buttons in the second row. |
||
Basic HTML password form | The HTML password form code | |
|
<form action="W" method="post"> <input name="ID" type="text" value=" " size="8" maxlength="8">User ID <br> <input name="pass" type="password" value=" " size="8" maxlength="8">Password <br> <button name="senddata" type="submit">Login</button> </form> |
|
For the above example:
|
||
Basic HTML drop-down form | The HTML drop-down form code | |
|
<form> What would you like most in a web host ? <select name="mydropdown"> <option>Cheap web hosting</option> <option>High band width</option> <option>FTP file access</option> </select> </form> |