COMPUTER LECTURES

HOME About us HTML ONLINE CODE EDITOR CONTACT US
HTML | INPUT TYPES

SYNTAX

OPENING TAG CLOSING TAG
<input>

Input Tag in HTML

<input type=" " size=" " name=" " maxlength=" ">

Example : input.html

<!DOCTYPE html>
<html>
<title>Computer lectures | Input types</title>
<body>
<form>

<label for="First name"> First Name: </label> <br/>
<input type="text" name="computerlectures_firstname" size="60" maxlength="30"> <br/>
<label for="Last name"> Last name: </label> <br/>
<input type="text" name="computerlectures_lastname" size="60" maxlength="30"> <br/>
<label for="Phone Number"> Phone Number: </label> <br/>
<input type="number" name="computerlectures_phone" size="60" maxlength="11"> <br/>
<label for="Password"> Password: </label> <br/>
<input type="password" name="computerlectures_password" size="60" maxlength="30"> <br/>
<label for="Email address"> Email address: </label> <br/>
<input type="email" name="computerlectures_email" size="60" maxlength="30"> <br/>
<label for="Date of Birth"> Date of Birth: </label> <br/>
<input type="date" name="computerlectures_date" size="60" maxlength="30"> <br/>
<label for="Male"> Male: </label> <input type="radio" name="computerlectures_option"> <label for="Female"> Female: </label> <input type="radio" name="computerlectures_option" checked> <label for="Other"> Other: </label> <input type="radio" name="computerlectures_option"> <br/>
<label for="lecture 1"> Lecture 1: </label> <br/>
<input type="checkbox" name="computerlectures_selection 1"> <br/>
<label for="lecture 2"> Lecture 2: </label> <br/>
<input type="checkbox" name="computerlectures_selection 2" checked> <br/>
<label for="lecture 3"> Lecture 3: </label> <br/>
<input type="checkbox" name="computerlectures_selection 3"> <br/>
<label for="lecture 4"> Lecture 4: </label> <br/>
<input type="checkbox" name="computerlectures_selection 4"> <br/>
<label for="lecture 5"> Lecture 5: </label> <br/>
<input type="checkbox" name="computerlectures_selection 5"> <br/>
<input type="reset" value="Cancel">
<input type="submit" value="Submit">

<form>
</body>
</html>

The output on the web broswer

Input types