How to Create Feedback Form in HTML,CSS & BOOTSTRAP | Responsive & Beautiful Feedback Form

feedback form using HTML,CSS & Bootstrap4.

Firstly, create feedbackform.html file as shown below and import BOOTSTRAP4 CDN links and link the Custom CSS file.

feedbackform.html

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

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Feedback Form</title>

    <!-- BOOTSTRAP CDN Links -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap
/4.0.0/css/bootstrap.min.css"
        integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFc
JlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
        integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/
GpGFF93hXpG5KkN"
        crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd
/popper.min.js"
        integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/
ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
        crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/
bootstrap.min.js"
        integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/
JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
        crossorigin="anonymous"></script>

    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/
css2?family=Roboto+Slab:wght@500&display=swap" rel="stylesheet">

    <!-- Custom CSS file -->
    <link rel="stylesheet" href="feedbackform.css">

</head>

<body>

    <section id="form-section">
        <h1 class="h1-tag">Your Feedback Is important For Us</h1>
        <form class="form-content-section">
            <div class="form-group">
                <label for="exampleInputText">Name</label>
                <input type="text" class="form-control" 
id="exampleInputText" placeholder="Enter Your Name">
            </div>
            <div class="form-group">
                <label for="exampleInputEmail1">Email address</label>
                <input type="email" class="form-control" 
id="exampleInputEmail1" aria-describedby="emailHelp"
                    placeholder="Enter email">
                <small id="emailHelp" class="form-text text-muted">
We'll never share your email with anyone
                    else.</small>
            </div>
            <div class="form-group">
                <label for="exampleInputText">Contact Number(Optional)
</label>
                <input type="text" class="form-control" 
id="exampleInputText">
            </div>
            <div class="form-group">
                <label for="exampleFormControlTextarea1">Example textarea
</label>
                <textarea class="form-control" 
id="exampleFormControlTextarea1" rows="3"></textarea>
            </div>
            <button type="submit" class="btn btn-primary myclass">
Post Comment</button>
        </form>
    </section>

</body>

</html>
---------------------------------------------------------------------------
feedbackform.css

/* Create a New CSS File */
body {
    font-family'Roboto Slab'serif;
    background#DAE2F8;
    /* fallback for old browsers */
    background-webkit-linear-gradient(to right#D6A4A4#DAE2F8);
    /* Chrome 10-25, Safari 5.1-6 */
    backgroundlinear-gradient(to right#D6A4A4#DAE2F8);
    /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}

.h1-tag{
    text-aligncenter;
    margin-top4%;
}
.form-content-section{
    width50%;
    margin-top3%;
    margin-left25%;
}
@media screen and (max-width600px){
    .form-content-section{
        width100%;
        margin-top10%;
        margin-left0;
    }
}

@media screen and (max-width800px){
    .form-content-section{
        width100%;
        margin-top10%;
        margin-left0;
    }
}

@media screen and (max-width600px){
    .form-group{
        margin-left10px;
        margin-right10px;
    }
    .btn-primary{
        margin-left10px;
    }
}
@media screen and (max-width800px){
    .form-group{
        margin-left20px;
        margin-right20px;
    }
    .btn-primary{
        margin-left20px;
    }
}
.myclass{
    border-radius20px;
}
---------------------------------------------------------------------------
Here is the Output:-

 And Friends  Feel free to ask questions, I'm here to help you.
Thank you so much...

Comments