Level no.14/Level no.15

 It is a test day. Test no.3 in level 14.

Lecture no.15

This lecture is also based upon From tag
When we make form we ask from user different things like their name, number and email, so these all have different data type. In this lecture we have studied different attributes used in form tag.

Attributes:

Text:
It is used to specify the name of the from.
Name: <input="text">
Number:
It is used to specify number of the form.
Age: <input type="number">
Email:
It is used to specify the email format.
Email: <input type="email">
Determine:
It is used to specify the number of the form.
Phone number: <input type="determine">
Radio:
It is used for selecting one option from the given set of options.For selecting gender, cities and countries.
Syntax
Gender: <input type="radio" name="X">
In it name attribute is used to group different option together.
Code
Gender: Male <input type="radio" name="X"> Female <input type="radio" name="X">

checkbox:
It is used for selecting one or more option of the given options. By default the state of the checkbox is off.
Syntax
Select what you want to eat: <input type="checkbox" name="c">

Code
Select what you want to eat: <input type="checkbox" name="c">
Pizza <input type="checkbox" name="c"> Burger <input type="checkbox" name="c">
Fries <input type="checkbox" name="c"> Cold Drink <input type="checkbox" name="c">

Range: 
It is used to create a slider control that allows user to select a value with in a specified range

Syntax:

Select your spice level while ordering food: 1<input type="range">10

How to create Reset and Submit button using Form tag?

To create reset and submit button in form tag. First we create html document and then apply form tag. Create an input element in form tag and set the type attribute with reset.

Syntax
For Reset button 
<input type="reset">

For Submit button
<input type="submit">

Comments

Popular posts from this blog

Level no.4

Level no.21

Level no.3