HTML Form

Attributes of Input Text and Password

S.No. Element Description Example
1 Name Define a unique name of text box
2 Value Predefine Value of Text Box
3 Placeholder To give a Message in Text Box
4 Maxlength To validate a maximun lenght of text box
5 Size Defines a text box size
6 Required Validate to not balnk

Attributes of Radio Button and Check Box

S.No. Element Description Example
1 Name Define a unique name of text box
2 Value Define Value of Text Box
3 Checked By default checked

Attributes of Button

S.No. Element Description
1 Name Define a unique name of text box
2 Value Define Value of Text Box

Attributes of Textarea

S.No. Element Description Example
1 Name Define a unique name of Textarea
2 Placeholder To give a message
3 Cols To increase width
4 Rows To increase height
Example
Course
<select name='course' >
	<option value='DCSM'>DCSM</option>
	<option value='DCA'>DCA</option>
	<option value='CCB'>CCB</option>
	<option value='CCBT'>CCBT</option>
	<option value='CBGD'>CBGD</option>
</select>
Example
Peronal Details
Student' Name
Password
DOB
Gender MaleFemale
Hobbies PlayingDancingReading
Official Details
Course
Duration
Reg Date
<form >
<fieldset>
<legend>
Peronal Details
</legend>
<table cellpadding=10>
	<tr>
		<td>Student' Name 
		<td><input type='text' name='std_name' placeholder='Student name'>
	</tr>
	<tr>
		<td>Password
		<td><input type='password' name='pass' placeholder='Password'>
	</tr>
	<tr>
		<td>DOB
		<td><input type='date' name='pass' placeholder='Password'>
	</tr>
	<tr>
		<td>Gender
		<td><input type='radio' name='gender' value='M'>Male<input type='radio' name='gender' value='F'>Female
	</tr>
	<tr>
		<td>Hobbies
		<td><input type='checkbox' name='hobbies' value='Playing'>Playing<input type='checkbox' name='hobbies' value='Dancing'>Dancing<input type='checkbox' name='hobbies' value='Reading'>Reading
	</tr>
</table>
</fieldset>
<fieldset>
<legend>
Official Details
</legend>
<table cellpadding=10>
	<tr>
		<td>Course
		<td><select name='course'>
				<option>DCSM</option>
				<option>DCA</option>
	</tr>
	<tr>
		<td>Duration
		<td><input type='text' name='duration' placeholder='Duration'>
	</tr>
	<tr>
		<td>Reg Date
		<td><input type='date' name='reg_date'>
	</tr>
</table>
</fieldset>
<input type='submit'>
</form>