adc

clicks

how to make contact us form using html and css

 



HTML
Before we start writing code first, we need to create a primary structure of the HTML document, so that the browser can understand and start working. The basic HTML structure looks like the following.
After writing the primary structure of the HTML document, you will also write the tags and content you need. After that, you can see the output in your browser. We know that HTML Sudu Mae is used for exposing content in a basic format. To complete our content we need to use CSS, which is an HTML insert and it creates an engaging user interface.

<!DOCTYPE html>

<html>

<head>

                    <title>Contact Us</title>

                    <link rel="stylesheet" type="text/css" href="style.css">

</head>

<body>

                    <div class="container">

                                        <p>Contact Us</p>

                                        <div class="login">

                                                            <input type="text" name="" placeholder="Your Name" class="input">

                                                            <input type="text" name="" placeholder="Your  Email Address" class="input">

                                        </div>

 

                                        <div class="sub">

                                                            <input type="text" name="" placeholder="Subject" class="input">

                                        </div>

                                        <div class="msg">

                                                            <textarea class="area">Leave a Massage</textarea>

                                        </div>

                                        <div class="btn">Sent Message</div>

                    </div>

 

</body>

</html>

CSS 

Now, we have time to improve the HTML content, for that, we need to add CSS to the HTML file. CSS can be added to HTML documents in a total of three ways, here we are using outside CSS design using CSS will arrive here after typing and see the output in your browser.

*{

                    margin:0;

                    padding: 0;

}

 

body{

                    background-image: url(bg.jpg);

                    background-repeat: no-repeat;

                    background-size: cover;

                    height: auto;

                    font-family: Roboto;

}

 

.container{

                    max-width: 800px;

                    height: 600px;

                    background:#fff;

                    margin: 50px auto;

                    box-shadow: 0 0 20px rgba(72, 98, 85,0.6);

                    box-sizing: border-box;

                    padding: 40px;

}

p{

                    text-align: center;

                    letter-spacing: 1px;

                    font-size: 45px;

                    margin-bottom: 20px;

                    color: #486255;

}

.input,

.msg.area{

                    width: 100%;

                    padding: 20px;

                    box-sizing: border-box;

                    margin-bottom: 25px;

                    border: 2px solid #e9eaea;

                    font-size: 14px;

                    border-radius: 5px;

                    outline: none;

                    transform: all 0.5s  ease;

}

 .login .input{

  width: 48%;

  float: left;

  margin-right: 4%;

}

 .login .input:last-child{

                    margin-right: 0;

}

.msg .area{

                    height: 200px;

}

.btn{

                    width: 250px;

                    background: #486255;

                    height: 50px;

                    text-align: center;

                    line-height: 50px;

                    border-radius: 5px;

                    margin: 40px auto;

                    color:#fff;

                    text-transform: uppercase;

                    cursor: pointer;

}

.input:focus,

.msg .area:focus{

                    border: 2px solid #756255;

}

 

 

Source Code






how to make contact us form using html and css how to make  contact us form using html and css Reviewed by easycoding on August 26, 2020 Rating: 5

No comments:

Powered by Blogger.