Difference between revisions of "Forms"

From MyWiki
Jump to: navigation, search
Line 12: Line 12:
 
<form>
 
<form>
 
Password: <input type="password" name="pwd">
 
Password: <input type="password" name="pwd">
 +
</form>
 +
</source>
 +
<source lang="html4strict">
 +
<form>
 +
<input type="radio" name="sex" value="male">Male<br>
 +
<input type="radio" name="sex" value="female">Female
 
</form>  
 
</form>  
 
</source>
 
</source>

Revision as of 16:35, 12 June 2014

http://www.w3schools.com/html/html_forms.asp

 Text Fields
 <input type="text"> defines a one-line input field that a user can enter text into:
 <form>
 First name: <input type="text" name="firstname"><br>
  Last name: <input type="text" name="lastname">
 </form>

Also note that the default width of a text field is 20 characters.

<form>
Password: <input type="password" name="pwd">
</form>
<form>
<input type="radio" name="sex" value="male">Male<br>
<input type="radio" name="sex" value="female">Female
</form>