In this lesson “Form in HTML” we will learn the basic of the form and later in next lessons we will learn deep info.
This Video Explain The Same Lesson Content:
HTML <form> Element
<form> element defines a form that is used to collect user input, means the window between the user and the server. An HTML form contains form elements.
There is many types of elements in form input, like text fields, checkboxes, radio buttons, submit buttons, and more.
HTML <input> Element
<input> element is the most important form element which is the base tag in form.
<input> element can be displayed in several ways, depending on the type attribute we have.
Some <input> Example:
|1- <input type=”text”>||Defines a one-line text input field|
|2- <input type=”radio”>||Defines a radio button (for selecting one of many choices)|
|3- <input type=”submit”>||Defines a submit button (for submitting the form)|
<input type="text"> defines a one-line input field for text input that receives only text characters.
<form> Name:<br> <input type="text" name="Name"><br> Company:<br> <input type="text" name="Company"> </form>
Radio Button Input
<input type="radio"> defines a radio button. The main purpose of radio buttons is to let a user select ONE of a limited number of choices.
<form> <input type="radio" name="language" value="German" checked> German<br> <input type="radio" name="language" value="English"> English<br> <input type="radio" name="language" value="Arabic"> Arabic </form>
HTML Submit Button
<input type="submit"> defines a button for submitting the form data to a form-action. The form-action is typically a server page with a script for processing input data. The form-action is specified in the form’s action attribute.
<form target="_blank" action="/action_page.php"> First name:<br> <input type="text" name="firstname" value="Mickey"><br> Last name:<br> <input type="text" name="lastname" value="Mouse"><br><br> <input type="submit" value="Submit"> </form>
HTML Form Action Attribute
<form target="_blank" action="/action_page.php">
This post is one of the HTML5 for deep understanding course. where we will learn every common elements from basic to the advanced element.
In addition each lesson has a video which you could visit and watch for more practicing and for deep understanding.
We hope that we could give the best for you and for the deep and easy understanding.
You could follow the series from our website SAFHATECH.com and go to categories and then programming and then Choose the course you want then just click next post to go step by step.
Finally we hope every thing is works as you suspect.
Consequently You could follow us at :
Website URL: https://www.safhatech.com/