They are forms that are made in the HTML page and they are under the form tag in which the entry tags are built and data is filled inside, as this language provided us with the ability to deal with entry screens, fetch information, log in and exit and interact with activities within our pages.
Examples of the uses of forms are the Facebook login page, Microsoft and YouTube pages, and other pages of other websites.
<form> . form tags . </form>
The main component of HTML Forms is the presence of the form tag, then the input values are built and formed as we want, and the reason for the presence of the forms tag is the need to use the input that the user entered on our page and process it elsewhere.
2. Tags Inputs
Having a form alone is not enough, so we will need input tags that enable us to enter the appropriate values inside it, which are in the form of:
- Texts: Texts are entered based on selecting the type in this tag, which is like this:
<input type = "text" name="username" placeholder="Your name" maxlength="10">
An input tag of text type contains the user name with a hint, the number of accepted characters is 10, and the type command determines the type of input we are working on.
- Password: It encrypts all entries in this tag to appear with hidden dots.
<input type = "password" name="password" placeholder="Password">
- Submit: It is in the form of downloading information, which often goes to databases.
<input type="submit" value="Sign Up">
Please, to understand HTML Forms well, copy the following codes into a text file and do not forget to change its extension to .html and then run it in your browser.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name = "description" content="Html for beginner"> <title>Form part1 label,text input , password input , checkbox , submit input</title> <link rel="stylsheet" href="style.css"> <script></script> <style> </style> </head> <body> <!--Create youe own login page--> <!--This is form--> <form name="register" > <label>Username</label> <input type = "text" name="username" placeholder="Your name" maxlength="10"> <br> <label>Password</label> <input type = "password" name="password" placeholder="Password"> <br> <input type="checkbox"> <label>Remember me</label> <input type="submit" value="Sign Up"> </form> </body> </html>