Skip to main content

How to make form in HTML?


 

Here in this blog, we are providing the programming codes for making an HTML form.

so here are the following codes:-


<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>forms</title>
</head>

<body>
    <h2>this is form tutorial</h2>
    <form action="backend.php">
        <!-- yaha par bas input type karo aur ek list dikhayga aur jo daalna
        hai select kar lo -->
      <!-- here label works that if label for="name" and id ="name" than if we
        will click on name on html web page than the cursor will go on the
        name entry box -->
        <label for="name">Name</label>
        <div>
            <input type="text" id="name">
        </div>
        <br>
        <div>
            Role: <input type="text">
        </div>
        <br>
        <div>
            Email: <input type="email" name="myemail">
        </div>
        <br>
        <div>Date:<input type="date" name="my date"></div>
        <br>
        <div>Bonus <input type="number" name="mybonus"></div>
        <br>
        <!-- if you want checbox to be checked than put command checked -->
        <label for="eli">Are u Eligible</label>
        <div><input type="checkbox" name="my checkbox" id="eli" checked></div>
        <br>
        <div>Gender: Male <input type="radio" name="my gender">Female
        <input type="radio" name="my gender">Other <input
                type="radio" name="my gender"></div>
        <div>Write about <br> <textarea name="mytext" cols="30" rows="10">
        </textarea></div>
        <br>
        <div>
            <label for="car">Car</label>
            <select name="mycar" id="car">
                <option value="swift">Swift</option>
          <!-- here selected works for the option that gets auto selected -->
                <option value="alto" selected>alto</option>
            </select>
        </div>
        <br>
        <div>
            <input type="submit" value="Submit Now">
            <input type="reset" value="Reset">
        </div>

    </form>
</body>

</html>


Comments

Popular posts from this blog

How to add the treeview numbers to get the grand total in tkinter entry box

 in this blog we are going to know about the adding of the integers in the treeview and get the total in the entry box of tkinter so here is the image first so the coding to do such things are here as follow but here is the condition that pls make assured that the state of entry box is disabled.......      for child in my_tree1 . get_children ():         e2l . config ( state = "normal" )         b1 += float ( my_tree1 . item ( child , "values" )[ 3 ])         var2 . set ( b1 )         e2l . config ( state = "disable" )      l2l = Label ( ento , text = "Purnea-2" , width = 8 )      l2l . grid ( row = 0 , column = 1 )     e2l = Entry ( ento , textvariable = var2 , state = "disable" , width = 8 )     e2l . grid ( row = 1 , column = 1 )