Skip to main content

Create a web form using html

 How to create a web form using html

Today web development is going to be very famous. There are so many ways through we can make our own website. Website is just the collection of webpages. Webpages consist of different things, sections. In webpages we can make our own design so it will seen be unique. We can make website with the help of many frameworks or some software that provides some features. Like WordPress etc. But the direct way to make a web page is with the help of coding in html. You can use any of the IDE [ integrated development environment] or you can use simply notepad. But in any editor you have to save the file with the help of extension. For example in C++ language the extension is [.cpp] and in java the extension is[ .java ] same like in html the extension is [.html] . Now we are going to create a web form using html. Web form in simply the web page which consist of some question which is used for taking information from others. For creating simple web form we are going to use HTML and CSS[ cascading style sheet ] which is used to give styling to our website. In simple words we can say that if HTML is skeleton of body then the CSS is the skin of body. Now we are going to see how to create a web form using html. Firstly you have to choose a text editor then you have to implement your coding and designing part. For create a web form using html you can check the code given below :-

<!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>Customer's information form</title>
    <style>

        h1{
        text-align: center;
        color: red;
        background-color: rgb(197, 151, 151);
        }
        input{
        background-color: white;
        margin-left: 20px;
        }
        label{
        margin-left: 600px;
        font-weight: bold;
        font-size: 20px;
        }
        h2{
        color: red;
        font-weight: bold;
        font-size: 25px;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        background-color: none;
        text-align: center;
        }
        #male,#Female{
        margin-left: 10px;
        }
        #others,#eng,#hin,#pun{
        margin-left: 0px;
        }
        section{
        background-color: rgb(209, 221, 209);
        margin: 50px 50px;
        }
        #comment{
        margin-left: 500px;
        }
        #just{
        font-size: 20px;
            margin-left: 550px;
            padding: 4px;
        }
        #justy{
            font-size: 20px;
            margin-left: 160px;
            padding: 4px;
        }
    </style>
</head>
<body>
    <section>
    <h1>Fill this form</h1>
    <h2>Personal Details</h2>
    <!-- <label>Customer's Name</label> -->
    <label>Name : </label>
    <input type="text"><br><br>
    <label>City : </label>
    <input type="text"><br><br>
    <label>Gender : </label>
    <input type="radio" name="gender" value="Male">
    <label id="male">Male</label>
    <input type="radio" name="gender" value="Female">
    <label id="Female">Female</label>
    <input type="radio" name="gender" value="Others">
    <label id="others">Others</label><br><br>
    <label>Languages Known : </label>
    <input type="checkbox" value="English">
    <label id="eng">English</label>
    <input type="checkbox" value="Hindi">
    <label id="hin">Hindi</label>
    <input type="checkbox" value="Punjabi">
    <label id="pun">Punjabi</label>
    <h2>Address</h2>
    <textarea  id="comment" cols="60" rows="10"></textarea><br>
    <h2>Submit Here</h2>
    <input type="submit" value="submit" id="just">
    <input type="reset" id="justy"><br><br>
</section>
 
</body>
</html>

Above is the coding for create a web form using html. In above code we have added some CSS for styling our web form. After writing our code our web form is created and look like this.

Create a web form using html

This is the simple web form that we created with the help of html. So you can also create a web form using html. HTML is very easy markup language if you spent only 1 week for HTML you will also learn the HTML language and they already know the HTML language they can also try to make something new web pages.


Comments