Jump to: navigation, search

HTML form input text

From w3cyberlearnings

Contents

HTML - Form Input Text Tag

Input Text Tag is a single input line, it uses in form to allow user to type in information.

HTML - Syntax Form Input Text Tag

<input type="text" name="school"/>
<input type="text" name="class"/>

Example - Attributes

Attributes Example Description
size <input type="text" name="fe" size="30"/> Specifies the size of the input text
maxlength <input type="text" size="30" maxlength="40"/> Specifies the maximum length allow
value <input type="text" name="fe" value="344"/> Specifies the value of the input text
disabled <input type="text" name="fe" disabled="disabled"/> Disable the input field

Example TRY-IT

<html>
<head>
<title>Reset password</title>
</head>
<body>
<p>Provide your full name and email address to reset your password</p>
<form action="/reset_password.php" method="get">
<table>
<tr>
	<td>First Name:</td>
	<td>
		<input type="text" name="first_name" size="4" maxlength="50"/>
	</td>
</tr>
<tr>
	<td>Last Name:</td>
	<td>
		<input type="text" name="last_name" size="3" maxlength="50"/>
	</td>
</tr>
<tr>
	<td>Login Email:</td>
	<td>
		<input type="text" name="login_email" size="20" disabled="disabled"/>
	</td>
</tr>
<tr>
	<td colspan="2">
		<input type="submit" name="reset_user" value="Rest Password"/>
	</td>
</tr>
</table>
</form>
</body>
</html>

Output

Html input 1.png

Related Link


Navigation
Web
SQL
MISC
References