html forms : Lesson13 HTML for beginners

Html Forms

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.


1. Definition

form tags

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">



3. Example

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>


        <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">
                            <!--Create youe own login page-->
        <!--This is form-->
        <form name="register" >
            <input type = "text" name="username" placeholder="Your name" maxlength="10">
            <input type = "password" name="password" placeholder="Password">
            <input type="checkbox">
            <label>Remember me</label>
            <input type="submit" value="Sign Up">



Leave a Reply

Your email address will not be published. Required fields are marked *