Learn HTML Tutorial 4

HTML Form:


We usually used html form to get the data from user.Differen attribute and element are used for creating the form.Let we see each one in detail.

<form></form> = Html form has an opening tag and ending.

Text And Submit Button.


<input> = An element used between the form take different input from user.
type = is an attribute used for different purpose such as submit button,text field etc.

Value = Is an attribute used to display the value in text field and submit etc..

<form>

<input  type = "text" value = "" >

<input type = "submit" value = "submit">

</form>
Output



Textarea In Html.


Textarea is used for written long text in contrast of text field.In which we used multiple column and rows.Let see how we make textarea in html.<textarea></textarea> = This element has opening and ending tag.row & Column = we can use multiple rows and column attribute in textarea element.Let we see how we write textarea in html form.

<form>

<textarea rows = "8" cols= "8">

This is my textarea of html. In which i used forum rows and four column.

</textarea>

</form>

Output



Drop Down List:


For drop down list we used select element and multiple option element.
<select></select> = Select element has opening and ending element.
<option> = option element is used for select one option among various.

Now we see how we write drop down list.

<form>
<select>
<option value = "orange">orange</option>
<option value = "mango">mango</option>
<option value = "apple">apple</option>
</select>
</form>

Output



Radio Button


In html we used radio button to check one option and unchecked all other option.
Let we see how we make radio button.
<form>
<input type = "radio" value = "married">Married<br>
<input type = "radio" value = "unmarried">Unmarried
</form>

Output

Married

Unmarried

Checkbox In Html:


Checkbox is used to select multiple option.In input element we used type = "checkbox" attribute.Let see how we create checkbox in html form.

<form>
<p> Select multiple fruit which you like.</P>

Apple<input  type = "checkbox" value = "apple">
Orange<input type = "checkbox" value = "orange">
Watermelon<input type = "checkbox" value = "watermelon">
Cherry<input type = "checkbox" value = "cherry">

</form>

Select multiple fruit which you like.


Apple
Orange
Watermelon
Cherry

Next Lesson
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment