Table of Contents

How to create simple contact form with Css

Share Now :

Title : How to create simple contact form with Css | W3Pupil

Description

Hello W3PUPIL!!

W3pupil provides a dynamic and visually appealing contact form snippet that showcases your data in a single glance. This contact form snippet is created with precision using HTML and CSS.

This contact form snippet uses HTML and CSS to provide a user-friendly experience. It contains entry fields for the user’s first name, last name, email address, and website name, along with subtle placeholders that guide the user through the form. It also includes a message box where the user can write the message they want to convey. The contact form also includes a send button, which has a unique hover effect that makes it stand out from the rest. Besides enhancing the user interface, this contact form snippet also provides a secure login gateway for users to gain easy access to their account. CSS makes the contact form responsive and allows you to adjust it for different screen sizes to ensure a smooth experience on any device.

By using this HTML and CSS contact form snippet, you’re not just sharing information – you’re demonstrating your dedication to professionalism and contemporary web design. Show off and interact with the world with this innovative and creative contact form snippet.

Let's know how to create a file..

Creating and managing files and folders efficiently is crucial for a seamless development experience. A step-by-step tutorial is provided below:

W3pupil’s suggestion is to download and install Visual Studio Code.

  • After the successful completion of downloading and installing, open Visual Studio Code.
  • Create a new folder in your desktop.
  • Go to file and then open the folder created.
  • Then add a file for html with “.html” or “.htm” extension.
  • Also add another file for css with “.css” extension.
  • Now, you have a blank HTML file and CSS file ready for your code.

Let's know how to open a downloaded file..

  • After downloading the snippet file from W3pupil, you will receive a zip file.
  • Extract the file and open it in Visual Studio Code.
  • Now you have the HTML file and CSS file to work with.
  • Take time to fully understand the code’s functionality before making any desired changes.

Let's take a look at a code snippet created by W3pupil team using HTML and CSS.

HTML SOURCE CODE LOGO

HTML Source Code

HTML (Hypertext Markup Language) is a standard markup language for creating web pages, defining their structure and content using a system of tags and elements. (index.html)

  <!--Hello Future Developer Thanks for Using w3pupil.com, Share & Support us-->
<div class="container">
<div class="container-sub">
    <h1>CONTACT US</h1>
    
        <div class="flexgroup">
        <label>First Name</label>
        
    </div>
        <div class="flexgroup">
        <label>Last Name</label>
        
    </div>
        <div class="flexgroup">
        <label>Email Address</label>
        
    </div>
        <div class="flexgroup">
        <label>Website Name</label>
        
    </div>
        <textarea></textarea>
        
    
     <div class="credit">Made with <span>❤ </span>by <a href="https://www.w3pupil.com/">W3pupil</a></div>
</div>
</div>
<!--Check our website Regularly For New Snippets Post-->  
CSS SOURCE CODE IMAGE

CSS Source Code

CSS (Cascading Style Sheet) enhances website aesthetics and layout, applying styles and design elements to create a visually appealing and responsive user interface. (style.css)

  /** 
Hello Future Developer Thanks for Using w3pupil.com, 
Check our website Regularly For New Snippets Post.

Share & Support us
**/
@import url('https://fonts.googleapis.com/css2?family=Mukta:wght@300&family=Nunito+Sans:opsz,wght@6..12,300&display=swap');
*{
    box-sizing: border-box;
}
:root{
    --bg:#ffffff;
    --font:'Mukta', sans-serif;
}
h1,h4{
    margin:0%;
}
body{
    margin: 0%;
    font-family: var(--font);
}
.container{
    height:100vh;
    max-height:fit-content;
    display:flex;
    justify-content:center;
    align-items:center;
    background-image: linear-gradient(#f5ebe0,#d1b09c);
}
.container-sub{
    box-shadow:rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    text-align:center;
    background-color: rgba(255, 255, 255, 0.5);
    padding:20px;
    width:600px;
    height:auto;
    border-radius: 10px;
}
.container-sub h1{
    font-size:60px;
    background:-webkit-linear-gradient(#c4bfbf, #7e3c14);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.container-sub form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width:100%;
    height:auto;
}
.container-sub form .flexgroup label{
    text-align: left;
    font-weight: 900;

}
.container-sub form .flexgroup{
    display: flex;
    flex-direction: column;
    flex-basis:40%;
    margin:20px 10px;
    row-gap:20px;
}
.container-sub form input[type="text"],input[type="email"]{
    font-size:15px;
    padding:10px 0px;
    background:none;
    outline:none;
    border:none;
    border-bottom:2px solid #c5bebe;
}
.container-sub form textarea{
    background:none;
    outline:none;
    border-radius:10px;
    border:2px solid #c5bebe;
    padding:10px;
    margin-top:20px;
    height:120px;
    width:85%;
    resize: none;
    overflow-y:auto;
}
textarea,input[type="text"]::placeholder,input[type="email"]::placeholder{
    font-family:var(--font);
}
textarea::-webkit-scrollbar{
    width: 10px;
    cursor: pointer;
}
textarea::-webkit-scrollbar-thumb{
    background-color: #555;
    border-radius: 5px;
    cursor: pointer;
}
textarea::-webkit-scrollbar-thumb:hover{
    background-color: #777;
}
textarea::-webkit-scrollbar-thumb:active{
    background-color: #333;
}
textarea::-webkit-scrollbar-track{
    background-color:transparent;
}
.container-sub form input[type="submit"]{
    width:200px;
    height:50px;
    border:none;
    border-radius:10px;
    background-color:#d1b09c;
    color:rgb(73, 70, 70);
    font-size:20px;
    font-weight:400;
    margin:20px 0;
}
.container-sub form input[type="submit"]:hover{
    cursor:pointer;
    color:black;
    background-color:#bb875d ;
    transition:0.5s;
}
@media only screen and (max-width: 1024px){
    .container-sub{
        width:65vw;
    }
}
@media only screen and (max-width: 630px){
    .container-sub{
        width:96vw;
    }
    .container-sub h1{
        font-size:40px;
    }
    .container-sub form{
        display:flex;
        flex-direction:column;
    }
    .container-sub form .flexgroup{
        width:100%;
    }
    .container-sub form textarea{
        width:100%;
        max-width:100%;
    }
}
.credit a{
    text-decoration: none;
    color: #121212;
    font-weight: 800;
}
.credit{
    color: #121212;
    text-align: center;
    margin-top: 10px;
    font-family: Verdana,Geneva,Tahoma,sans-serif;
}  

Note :

  • The CSS is coded in a separate file and linked to the HTML file.

Download :

Share and Support W3pupil.com

Conclusion :

To modify the code, you can download the snippet’s source code files. To enhance your skills in HTML and CSS, you can try to recreate other creative HTML and CSS snippets available on W3pupil. In case you experience any technical related doubts, you are welcome to contact W3pupil. We’ll try to solve your request at the earliest.

Like Reaction
Like Reaction
Like Reaction
Like Reaction
Like Reaction

LivePreview :