What are HTML Forms?
Form elements are different types of input elements, like text fields, checkboxes, radio buttons, submit buttons, and more.

Do you have similar website/ Product?
Show in this page just for only
$2 (for a month)

0/60
0/180
The HTML<form>
If the action attribute is omitted, the action is set to the current page.
<form> form elements </form> |
<input>Element
The <input> element is the most important form element. It can be displayed in several ways, depending on the type attribute.
<input type="text"> For one-line text input field |
<input type="radio"> Defines a radio button |
<input type="submit"> Defines a submit button |
Action Attribute
The action attribute defines the action to be performed when the form is submitted.
Normally, the form data is sent to a web page on the server when the user clicks on the submit button.
<form action="/action_page.php"> |
Target Attribute
The target attribute specifies if the submitted result will open in a new browser tab, a frame, or in the current window.
The default value is "_self" which means the form will be submitted in the current window.
To make the form result open in a new browser tab, use the value "_blank":
<form action="/action_page.php" target="_blank"> |
Other legal values are "_parent", "_top", or a name representing the name of an iframe.
Method Attribute
The method attribute specifies the HTTP method (GET or POST) to be used when submitting the form data:
<form action="/action_page.php" method="get"> |
CONTINUE READING
HTML
Ayesha
Tech writer at newsandstory