HTML TUTORIAL FOR BEGINNERS PART 8
If you have a Facebook account you have to submit your first name, lastname,email address or phone, password, date of birth, country, gender and more to Facebook to record your information in its servers or databases.
Today you learn how to create those kinda textfields you’ve experienced on Facebook.
As I mentioned earlier Facebook wants your firstname, lastname, email or phone,password, date of birth, gender, country.
All of these are input fields that we’re going to learn them.
### Like the below image which is from Facebook signup form👇
To create this of forms in HTML we use form element.
Every other content is wrapped inside form element like: first name input field. Last name input field...
Look at the below code 👇
<!--Your input fields come here-->
In HTML when we create form, it has some attributes like other elements for example:
### Method attribute takes two parameters:
These parameters are very crucial and important when submitting form to a server.
Differences between POST and GET parameters is as follow:
GET is for getting data from form.
POST is for sending data through a form like comment,story...
These are some useful form attributes👇
#### Now let's learn how to create a basic form in HTML:
<label for="firstname">First Name</label>
<input type="text" id="firstname" placeholder="First Name">
<input type="text" id="lastname" placeholder="Lastname">
<input type="submit" value="submit">
We can create email input field just by changing the type value to email and to create password field change into password and so on so.
#### Some are the useful form input fields 👇
As well these input fields like email, password, number, url, search, tel have some attributes like below👇
Forms are very useful in a website and a web app.
### Look at the below Examples👇
<input type="text" id="username" placeholder="Username">
<input type="email" id="email" placeholder="Email">
<input type="password" id="password">
<h1>Choose your favourite subjects?</h1>
<input type="checkbox" id="math">
<input type="checkbox" id="biology" checked>
<h1>Choose your gender?</h1>
<input type="radio" name="gender" id="male">
<input type="radio" name="gender" id="female">
<label for="languages">Choose your language</label>
<select id="languages" multiple>
<option value="English" selected>English</option>
I hope you enjoy the video and also share and like it