injob

You are welcome to Tecpins, it is free tutorials for people who want to learn about Html Tutorial,Android Tutorials,PHP Tutorials,Java Tutorials and Css Tutorials.

Post Top Ad

728-90
Responsive Ads Here

How To Create a Contact Form Using HTML?

How-To-Create-a-Contact-Form

Hellow!
Today, I am going to tell you "How to create contact form using html?". Let's start lesson now.

  1. Open your notepad or html editor.
Here the example, I used "Notepad++". open it and select HTML language.


      2. Place below codes to the Notepad.



<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {font-family: Arial, Helvetica, sans-serif;}
* {box-sizing: border-box;}

input[type=text], select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  margin-top: 6px;
  margin-bottom: 16px;
  resize: vertical;
}

input[type=submit] {
  background-color: #4CAF50;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

input[type=submit]:hover {
  background-color: #45a049;
}

.container {
  border-radius: 5px;
  background-color: #f2f2f2;
  padding: 20px;
}
</style>
</head>
<body>

<h3>Contact Form</h3>

<div class="container">
  <form action="/action_page.php">
    <label for="fname">First Name</label>
    <input type="text" id="fname" name="firstname" placeholder="Your name..">

    <label for="lname">Last Name</label>
    <input type="text" id="lname" name="lastname" placeholder="Your last name..">

    <label for="country">Country</label>
    <select id="country" name="country">
      <option value="australia">Australia</option>
      <option value="canada">Canada</option>
      <option value="usa">USA</option>
    </select>

    <label for="subject">Subject</label>
    <textarea id="subject" name="subject" placeholder="Write something.." style="height:200px"></textarea>

    <input type="submit" value="Submit">
  </form>
</div>

</body>
</html>
     3. Save as index.html

Thank You for Watched this Post/Video.

Don't forget "Subscribe" and "Like" us on You Tube.

Fllow us :
Website   : https://www.tecpins.com
You Tube  : https://www.youtube.com/tecpins
Facebook  : https://www.facebook.com/tecpins
Twitter   : https://www.twitter.com/tecpins